• 🏆 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] Help with spell!

Status
Not open for further replies.
Yo.
This is my spell. It is supposed to send shockwaves into 4 different angles around the target. I have tested and it worked before i edited the trigger.

Before it sent shockwaves in 4 random directions (witout arrays)
Now it should send shockwaves in 4 specific direction (with 4 arrays)

Before i inserted arrays it worked perfect, i just wanted it to be specific angles. (north, south, west, east)
Nothing happens when i use the spell now. But, why??

Take a look at the trigger below:
  • Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Ignitation
    • Actions
      • Set F_Caster = (Casting unit)
      • Set F_Target = (Target unit of ability being cast)
      • Set F_Position = (Position of F_Target)
      • -------- --------
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set F_Offset = (F_Position offset by 150.00 towards F_Real[(Integer A)] degrees)
          • Unit - Create 1 Dummy for (Owner of F_Caster) at F_Position facing Default building facing degrees
          • Unit - Add Fire Ignitation (Dummy) to (Last created unit)
          • Unit - Set level of Fire Ignitation (Dummy) for (Last created unit) to (Level of Fire Ignitation for F_Caster)
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave F_Offset
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set F_Real[(Integer A)] = ((Real((Integer A))) x 90.00)
          • Custom script: call RemoveLocation(udg_F_Offset)
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Use this:

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Ability>
    • Actions
      • Set Point_1 = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Point_2 = (Point_1 offset by 200.00 towards ((Real((Integer A))) x 90.00) degrees)
          • Unit - Create 1 <Dummy> for (Owner of (Triggering unit)) at Point_1 facing Point_2
          • Unit - Add <DummyAbility to (Last created unit)
          • Unit - Set level of <DummyAbility>for (Last created unit) to (Level of Acid Bomb for (Triggering unit))
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave Point_2
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_Point_2)
      • Custom script: call RemoveLocation (udg_Point_1)
No need of arrays, and it will work perfectly.
 
Status
Not open for further replies.
Top