• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Where is the Fault ?

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,137
Where is the Fault ? [Solved]

When i casted spell only my Hero stuns from Soul Hit but Mana Burn does not work agains the target. When i removed stun, mana burn works well but i can't cast both spells. What can i do ?

  • Soul Hit Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Hit (mathog)
    • Actions
      • Set soul_hit_caster = (Casting unit)
      • Set soul_hit_target = (Target unit of ability being cast)
      • Set soulhit_target_loc = (Position of soul_hit_target)
      • Unit - Move soul_hit_caster instantly to soulhit_target_loc
      • Unit - Create 1 Dummy Unit JFA for Neutral Hostile at (Position of soul_hit_caster) facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Soul Hit / dummy to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt soul_hit_caster
      • Wait 0.50 seconds
      • Unit - Create 1 Dummy Unit JFA for Neutral Hostile at (Position of soul_hit_target) facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Mana Burn /dummy to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn soul_hit_target
 
Last edited:
Level 11
Joined
Jan 25, 2009
Messages
572
All this things can be made throught Triggers more easily done than this.
You can remove mana of unit with the Action "Unit - Set mana (To Value) or "Unit - Set mana (To Percent)". And for the stun, just leave it as it is.

You leak a Location variable in your Trigger. Use this below to remove it at the end of the trigger!
  • Custom script: call RemoveLocation (udg_soulhit_target_loc)
Change (Casting Unit) to (Triggering Unit) in the variable called "soul_hit_caster".

Place the Action "Unit - Add a 2.00 second Generic expiration timer to (Last created unit)" below the Action "Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn soul_hit_target". Do this for both Dummy Units.

Best Regards;
- Tom
 
Status
Not open for further replies.
Top