• 🏆 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 malfunction?

Status
Not open for further replies.
Level 4
Joined
Nov 17, 2015
Messages
91
Hello, I'd like so when a unit uses X ability, the target put under their control.

For some reason, the trigger executes fine, the triggering unit is hidden, and the unit is hit by the ability, but it doesn't change its ownership to player 1.

-Base of ability being cast is frost armor, target is a rabbit.
Can you find the error in this? Thanks for your time and effort in advance. :goblin_good_job:

  • Trans
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Hagamino Jutsu
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
      • Wait 2.00 seconds
      • Unit - Hide (Triggering unit)
 
Level 4
Joined
Nov 17, 2015
Messages
91
Hello, I'd like so when a unit uses X ability, the target put under their control.

For some reason, the trigger executes fine, the triggering unit is hidden, and the unit is hit by the ability, but it doesn't change its ownership to player 1.

-Base of ability being cast is frost armor, target is a rabbit.
Can you find the error in this? Thanks for your time and effort in advance. :goblin_good_job:

  • Trans
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Hagamino Jutsu
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
      • Wait 2.00 seconds
      • Unit - Hide (Triggering unit)


Hey guys! I solved it! Apparently the event needs to be begins casting, rather than finishes, so it can identify its target! :goblin_yeah:
 

EdgeOfChaos

E

EdgeOfChaos

You should actually use "Starts the Effect of an Ability". This is the most precise event for casting.
 
Level 12
Joined
May 22, 2015
Messages
1,051
"Finishes casting ..." only happens if you let the whole spell animation finish. This means you can interrupt it by telling your unit to move or something like that.

"Begins casting ..." is similar to the "unit is attacked" event in that you can cancel the animation before anything happens, but it still triggers the effect. As long as the cast animation is long enough before the cast point, you could cast this spell, press 'S' to stop the unit, and it would still run the trigger. You would be able to spam it like this since it doesn't start the cooldown or use any mana.

"Starts the effect ..." happens exactly how you would want it to - it is right when the mana is used and the cooldown starts (I think it might be just before these things happen but nothing happens in between, normally). You should use this for basically all spells. There usually are no exceptions.
 
Status
Not open for further replies.
Top