• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Rain of Fire

Status
Not open for further replies.
Level 4
Joined
May 23, 2010
Messages
83
using GUI to make a pseud-rain of fire, like various meteors coming, one at a time for a short period of time, and as i want to 2 units cast the same spell on the same time (1 cast per unit) i tried using hashtables and i really can't find an error, what occurs is: the randompoint is not found, as the models aren't created and the units near the point dont take damage. these are the triggers:

  • Rain of Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rain of Fire
    • Actions
      • Set rainoffire_targloc = (Target point of ability being cast)
      • Set rainoffire_aoe = (300.00 + (50.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • Set rainoffire_shardaoe = (100.00 + (25.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • Set rainoffire_sharddamage = (50.00 + ((0.50 + (0.10 x (Real((Level of (Ability being cast) for (Triggering unit)))))) x (Real((Strength of (Triggering unit) (Include bonuses))))))
      • Set rainoffire_shardnumber = ((5 x (Level of (Ability being cast) for (Triggering unit))) + 15)
      • Hashtable - Save rainoffire_aoe as (Key aoe) of (Key (Triggering unit)) in rainoffire_hashtable
      • Hashtable - Save rainoffire_shardaoe as (Key shardaoe) of (Key (Triggering unit)) in rainoffire_hashtable
      • Hashtable - Save rainoffire_sharddamage as (Key sharddamage) of (Key (Triggering unit)) in rainoffire_hashtable
      • Hashtable - Save rainoffire_shardnumber as (Key shardnumber) of (Key (Triggering unit)) in rainoffire_hashtable
      • Hashtable - Save Handle Ofrainoffire_targloc as (Key targloc) of (Key (Triggering unit)) in rainoffire_hashtable
      • Unit Group - Add (Triggering unit) to rainoffire_castergroup
      • Trigger - Turn on Rain of Fire Periodic Effect <gen>
  • Rain of Fire Periodic Effect
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in rainoffire_castergroup and do (Actions)
        • Loop - Actions
          • Set rainoffire_caster = (Picked unit)
          • Set rainoffire_aoe = (Load (Key aoe) of (Key (Picked unit)) from rainoffire_hashtable)
          • Set rainoffire_shardaoe = (Load (Key shardaoe) of (Key (Picked unit)) from rainoffire_hashtable)
          • Set rainoffire_sharddamage = (Load (Key sharddamage) of (Key (Picked unit)) from rainoffire_hashtable)
          • Set rainoffire_shardnumber = (Load (Key shardnumber) of (Key (Picked unit)) from rainoffire_hashtable)
          • Set rainoffire_targloc = (Load (Key targloc) of (Key (Picked unit)) in rainoffire_hashtable)
          • Set rainoffire_randompoint = (rainoffire_targloc offset by (Random real number between 0.00 and rainoffire_aoe) towards (Random angle) degrees)
          • Special Effect - Create a special effect at rainoffire_randompoint using Abilities\Spells\Demon\RainOfFire\RainOfFireTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set rainoffire_shardgroup = (Units within rainoffire_shardaoe of rainoffire_randompoint matching ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and
          • Unit Group - Pick every unit in rainoffire_shardgroup and do (Actions)
            • Loop - Actions
              • Unit - Cause rainoffire_caster to damage (Picked unit), dealing rainoffire_sharddamage damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation (udg_rainoffire_randompoint)
          • Custom script: call DestroyGroup (udg_rainoffire_shardgroup)
i got the variable shardnumber to later usage, as i need to limit shards and stop the ability. but it doesn't matter now... please anyone help me :)
 
Level 11
Joined
Jan 25, 2009
Messages
572
This is going to be some harder to trigger because you need timers and such because otherwise the damage will occur before the "model" have reached the ground. I know all how to do this but i know a more simple way of doing this. For each 0.05 second you create a dummy that casts the rain of fire ability at a randomed location as you've done here. Set the rain of fire spell to 1 shard and the damage you like and then it's just to create the dummy. If you want help with this to get it whole done you can give the whole spell to me because right now i have nothing to do...
 
Status
Not open for further replies.
Top