• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger cant find mistake

Status
Not open for further replies.
Level 2
Joined
May 18, 2010
Messages
16
Hey Ive made another trigger here and its just impossible I thought I found the mistake but then when I fixed it wont work.

2 Triggers when hitting them with Shadow strike the Target is supposed to be pushed back but now they get teleported to the center of the map its very weird !
  • Dwarf Shadow Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Strike
    • Actions
      • Set ss_const = 6.00
      • Set targetunit = (Target unit of ability being cast)
      • Set targetloc = (Position of (Targeted unit))
      • Set Casterloc = (Position of (Casting unit))
      • Set caster = (Triggering unit)
      • Set faceangle = ((Angle from Casterloc to targetloc) + 180.00)
      • Set distance = (Distance between targetloc and (Position of caster))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • distance Greater than 500.00
        • Then - Actions
          • Set distance = 500.00
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Casterloc)
      • Trigger - Turn on Dwarf Pushback Again <gen>
      • Wait (distance / (ss_const x 500.00)) game-time seconds
      • Trigger - Turn off Dwarf Pushback Again <gen>
      • Custom script: call RemoveLocation (udg_targetloc)

  • Dwarf Pushback Again
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set targetloc = (Position of (Targeted unit))
      • Set polarproj = (targetloc offset by (ss_const x 5.00) towards (Facing of caster) degrees)
      • Unit - Move targetunit instantly to polarproj, facing faceangle degrees
      • Custom script: call RemoveLocation(udg_polarproj)
      • Custom script: call RemoveLocation(udg_Casterloc)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Generally if something happens directly at point 0,0 that means an invalid position reference (location from a null or trying to get the X/Y of null).

Be aware that this can be abused in some maps so you should consider adding checks if it is at all possible for a null value to occur as a subject for a position reference.
 
Status
Not open for further replies.
Top