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

[Solved] Cant solve :(

Status
Not open for further replies.
Level 10
Joined
May 28, 2011
Messages
455
Im making an abilities from item illusion.
I need the caster, the target abilities being cast, and the illusion summoned.
How can i detect them in single trigger instead of two trigger with event - a unit starts the of an ability and event - a unit spawns a summoned unit respectively?
im GUI user.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
  • Events
    • Map initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set HashTable = (Last created hashtable)
  • Events
  • Conditions
  • Actions
    • //Set Illusion and Target
    • Custom script: set udg_i = GetHandleId(udg_Illusion)
    • Hashtable - Save Handle OfTarget as 0 of i in HashTable
    • Trigger - Add to Damage <gen> the event (Unit - Illusion takes damage)
  • Damage
    • Events
    • Conditions
    • Actions
      • Set Illusion = (Triggering unit)
      • Custom script: set udg_i = GetHandleId(udg_Illusion)
      • Set Target = (Load 0 of i in HashTable)
      • Unit - Cause (Damage source) to damage Target...
Variables:
HashTable --> Hashtable
i --> Integer
Illusion --> Unit
Target --> Unit
 
Level 8
Joined
Apr 26, 2011
Messages
403
  • Events
    • Unit is attacked
  • Conditions
    • (attacking unit) is Illusion_Caster
  • Actions
    • order (attacking unit) cast Juggnaunt - Mirror Image // depend on which skill you copy from
another way :

  • Events
    • Unit is attacked
  • Conditions
    • (attacking unit) is Illusion_Caster
  • Actions
    • if (mana of (attacking unit) is full)
      • create 1 (illusion) for owner of (attacking unit) blah blah
 
Status
Not open for further replies.
Top