• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger Help!

Status
Not open for further replies.
Level 9
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