Why Doesn't this spell work?

Level 3
Joined
Jun 1, 2010
Messages
31
Knocback Copy
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Deathpull
Actions
Set Caster0 = (Triggering unit)
Set Target_Copy = (Target unit of ability being cast)
Set LoopCounter_Copy = 0.00


Knockback Move Copy
Events
Time - Every 0.01 seconds of game time
Conditions
LoopCounter_Copy Less than or equal to 75.00
Actions
Set Temloc00_Copy = (Position of Caster0)
Set Temploc01_Copy = (Position of Target_Copy)
Set Temploc02_Copy = (Temploc01_Copy offset by -7.50 towards (Angle from Temloc00_Copy to Temploc01_Copy) degrees)
Unit - Move Target instantly to Temploc02_Copy
Custom script: call RemoveLocation(udg_Temloc00_Copy)
Custom script: call RemoveLocation(udg_Temploc01_Copy)
Custom script: call RemoveLocation(udg_Temploc02_Copy)
Set LoopCounter_Copy = (LoopCounter_Copy + 1.00)
Special Effect - Create a special effect attached to the origin of Target_Copy using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl

Please tell me!

PS:Iedited the spell, its a target one
 
Last edited:
Level 4
Joined
Jan 20, 2007
Messages
65
"Set Temloc00_Copy = (Position of Caster)"

Position of Caster is an undefined variable, as your trigger is firing off a periodic timer event, there is no caster unit to call from. You need to use a defined variable for this.
 
Your second trigger should be like this:
  • Trigger
  • Events
    • Time - Every 0.03 seconds of game-time -> Prefer this event. 0.01 is way too low.
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Target_Copy) Not Equal to No unit
        • LoopCounter_Copy Less than or equal to 75
      • Then - Actions
        • Set Temloc00_Copy = (Position of Caster0)
        • Set Temploc01_Copy = (Position of Target_Copy)
        • Set Temploc02_Copy = (Temploc01_Copy offset by 7.50 towards (Angle from Temloc00_Copy to Temploc01_Copy) degrees) --> Offset by 7.50, not -7.50. The Angle between the points is what will handle the direction of the knockback, not the negative offset value.
        • Unit - Move Target_Copy instantly to Temploc02_Copy --> Move Target_Copy, not Target, because you defined the Target_Copy variable in the first trigger.
        • Custom script: call RemoveLocation(udg_Temloc00_Copy)
        • Custom script: call RemoveLocation(udg_Temploc01_Copy)
        • Custom script: call RemoveLocation(udg_Temploc02_Copy)
        • Set LoopCounter_Copy = (LoopCounter_Copy + 1.00)
        • Special Effect - Create a special effect attached to the origin of Target_Copy using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
        • Special Effect - Destroy (Last created special effect)
      • Else - Actions
        • Trigger - Turn off (This trigger)
 
Top