• 🏆 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] A trouble with trigger...

Status
Not open for further replies.
Level 4
Joined
Aug 12, 2004
Messages
76
Can someone please tell me why this won't work? This is an ability with a stormbolt as a dummy spell. The dummy caster's ability is based on the spell impale. When the spell is cast on a target, it's supposed to cast impale six times on a target, but won't continue after the first one. I use WE unlimited. Please help ><
  • Druid Wrath of Nature
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Wrath of Nature (Druid)
    • Actions
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 50.00 towards 25.00 degrees) facing (Position of (Target unit of ability being cast))
      • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Position of (Target unit of ability being cast))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Wait 1.00 seconds
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 50.00 towards 25.00 degrees) facing (Position of (Target unit of ability being cast))
      • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Position of (Target unit of ability being cast))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Wait 1.00 seconds
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 50.00 towards 25.00 degrees) facing (Position of (Target unit of ability being cast))
      • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Position of (Target unit of ability being cast))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Wait 1.00 seconds
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 50.00 towards 25.00 degrees) facing (Position of (Target unit of ability being cast))
      • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Position of (Target unit of ability being cast))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Wait 1.00 seconds
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 50.00 towards 25.00 degrees) facing (Position of (Target unit of ability being cast))
      • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Position of (Target unit of ability being cast))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Wait 1.00 seconds
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 50.00 towards 25.00 degrees) facing (Position of (Target unit of ability being cast))
      • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Position of (Target unit of ability being cast))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Wait 1.00 seconds
 
Last edited by a moderator:
Level 40
Joined
Dec 14, 2005
Messages
10,532
Or you can use Triggering Unit, Just_Spectating. It's better anyways.

Oh, and you want Starts the Effect of an Ability. And not cause it's more efficient (it isn't to my knowledge), but because better conditions cause it.

I also added
  • tags to your post.
  • You should look into loops, too.
  • (note: this needs a variable called TempPoint and another called TempPoint2, both of which are Points, and a unit variable called TempUnit)
  • [trigger]Druid Wrath of Nature
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wrath of Nature (Druid)
    • Actions
      • Custom script: local unit udg_TempUnit
      • Set TempUnit = (Target Unit of Ability Being Cast)
      • For Each Integer A from 1 to 6, do actions
        • Loop - Actions
          • Set TempPoint = (Position of TempUnit)
          • Set TempPoint2 = (TempPoint offset by 50 towards 25 degrees)
          • Unit - Create 1 Dummy Caster for (Owner of (Triggering Unit)) at TempPoint2 facing TempPoint
          • Unit - Add Druid Dummy Ability (Wrath of Nature) to (Last created unit)
          • Unit - Order (Last created unit) to Undead Crypt Lord - Impale TempPoint
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Wait 1.00 seconds
      • Set TempUnit = No Unit
 
Level 4
Joined
Aug 12, 2004
Messages
76
err what do those custom scripts mean? Sorry, never used custom scripts in my life before... lol...
 
Status
Not open for further replies.
Top