• 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 Help!

Status
Not open for further replies.
Level 10
Joined
Jun 26, 2007
Messages
659
event responses like "casting unit" are lost by the trigger after some time, so they don't works after some wait
create 3 global variables : caster (an unit), center and target (two location)

  • Attack Oger
    • Events
      • Unit - A unit Start using an ability
    • Conditions
      • ((Unit-type of (Casting unit)) Equal to Kung-Fu Master) and ((Ability being cast) Equal to Attack - Hotkey A )
    • Actions
      • Custom script : local unit udg_caster
      • Custom script : local location udg_center
      • Custom script : local location udg_target
      • Set caster = (Casting unit)
      • Set center = (Center of Region 000 <gen>)
      • Set target = (Target point of ability being cast)
      • Wait 0.75 seconds
      • Unit - Move caster instantly to center
      • Wait 0.75 seconds
      • Unit - Cause caster to damage circular area after 0.05 seconds of radius 100.00 at target, dealing 100.00 damage of attack type Normal and damage type Normal
      • Wait 0.01 seconds
      • Unit - Move caster instantly to target
      • Custom script : call RemoveLocation(udg_center)
      • Custom script : call RemoveLocation(udg_target)
(the last lines are performed to avoid memory leak, because useless locations aren't deleted automaticaly by warcraft 3)

EDIT : i love internationnal forum, this one say i've answered this post 2 hours before it has been writen :D
 
Last edited:
Level 5
Joined
Feb 5, 2008
Messages
109
You don't need that "caster"-variable. Use Triggering Unit! Also divide the conditions, it's handier to edit later.

  • Conditions
    • Unit-type of (Triggering Unit) Equal to Kung-Fu Master
    • (Ability being cast) Equal to Attack - Hotkey A
  • Actions
    • Unit - Move (Triggering Unit) instantly to center
    • Unit - Cause (Triggering Unit) to damage circular area after 0.05 seconds of radius 100.00 at target, dealing 100.00 damage of attack type Normal and damage type Normal
    • Unit - Move (Triggering Unit) instantly to target
 
Status
Not open for further replies.
Top