• 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] super simple trigger not working

Status
Not open for further replies.
Level 9
Joined
Jan 14, 2008
Messages
366
  • feign death
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feign death
    • Actions
      • Unit - Set (Casting unit) movement speed to 0.00
      • Animation - Play (Casting unit)'s decay flesh animation
      • Wait 0.10 seconds
      • Animation - Change (Casting unit)'s animation speed to 0.00% of its original speed
      • Set feigndeathstate[(Player number of (Owner of (Casting unit)))] = 1
      • Player - Make Player 11 (Dark Green) treat (Owner of (Casting unit)) as an Ally
      • Unit - Remove Feign death from (Casting unit)
      • Unit - Add Stop feigning death (Casting unit)
why the FUCK does this piece of shit trigger not work ?

it works PERFECTLY FINE except for the last action. It simply doesnt fire.
 
Level 9
Joined
Jan 14, 2008
Messages
366
i appreciate your help,

but that can not be correct.

since it is only the very last action that does not fire.

the action before that does fire, and also refers to "casting unit" and also occurs after the wait action. conclusio errate.

thanks for trying.
 
Level 10
Joined
Jun 1, 2008
Messages
485
just change the "casting unit" to "triggering unit". After wait, as said above, casting unit become null if you use "Unit - start the effect of an ability" event.
And swap between add and remove ability sometimes make it icon not place correctly.
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
after using wait Casting unit becomes null so before using the wait save Casting unit in a unit variable then use that variable

This would be correct and needed if he wants more then one player to be able to use it at the same time. (A good idea to do it anyway, read more about it in the MUI tutorial (to lazy to write it myself, when someone already have))

I would consider doing the reorder of the last two actions as already suggested. And maybe change the event to: Unit - A unit begins channeling an ability (although that would only be to ensure the mana is drained, but as it does the other things it might be uneeded)
 
Level 3
Joined
Aug 19, 2007
Messages
24
graystuff is correct, but so are the rest of you.

Some abilities trigger events (defend, for example) when removed but do not do this when they are added. When this happens, it fires a completely different event and the Casting unit is set to null.

So, you can either solve it by:
1. Adding the ability before removing it, or
2. Using a local variable

However, if you have other units casting spells then you have to use a local variable (if another spell is cast during the wait period it will cause the trigger to malfunction)
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Just the the Casting unit into the variabel then use that variabel also try ading the abilitie before removing it.



Unit - A unit Starts the effect of an ability

Conditions

(Ability being cast) Equal to Feign death

Actions

Set Hero = Casting unit
Unit - Set (Hero) movement speed to 0.00
Animation - Play (Hero)'s decay flesh animation
Wait 0.10 seconds
Animation - Change (Hero)'s animation speed to 0.00% of its original speed
Set feigndeathstate[(Player number of (Owner of (Hero)))] = 1
Player - Make Player 11 (Dark Green) treat (Owner of (Hero)) as an Ally
Unit - Remove Feign death from (Hero) \/
Unit - Add Stop feigning death (Hero) /\

Do the last Part Add then Remove okay
 
Status
Not open for further replies.
Top