• 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.

Starts the effect of an ability (excluding item spells)

Status
Not open for further replies.
Level 13
Joined
Sep 29, 2008
Messages
672
how can i make item spells not activate this GUI event..?

thanks to those who help.

I tried adding a Boolean to check first with (Unit - uses item) event but (Unit - Starts the effect of an ability) initializes first even though i change the order of the triggers.
 
Level 13
Joined
Sep 29, 2008
Messages
672
no, u miss understood.

i meant how can i add a restriction to the starts the effect of an ability when an item ability is used.

because when u use unit - starts the effect of an ability it also includes those item spells.
but i don't want my spells to activate when it is an item ability.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I'm not sure if this would work (perhaps I could try it out tomorrow) but what if you combined the two events?

If the unit uses item event is always going to fire when unit starts effect (because using an item fires both events, I believe) then all you need to do is determine when unit starts effect fires and unit uses item does not. This way you know whether or not the cause of the event was a unit ability or an item ability.

I'll visit back tomorrow to see how your progress is going, and maybe I'll try to work something out similar to what I described.
 
Level 10
Joined
Jul 12, 2009
Messages
321
I had success setting a boolean variable when a unit uses an item. Perhaps I'm wrong, but I believe the order of events is always: unit issued order > unit uses item > unit starts the effect of an ability. Therefore, you can set the boolean to false upon issuing an order (to reset it), true when it uses an item, and then only do actions if the boolean is false when the spell starts its effect.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Yea I remember doing tests to determine what order triggers are executed in (for things like this) but I don't really remember what my results were, which is why I was planning on giving it some time.

I really don't know why I thought I would be able to work on it today though, or tomorrow for that matter, because I work all weekend. It seems like you got it to work though?
 
Status
Not open for further replies.
Top