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

mebey an easy question

Status
Not open for further replies.
Level 5
Joined
Nov 6, 2008
Messages
150
hi if you make two events in a trigger will the trigger only work if the both are happing or is that when one of then happing like if i use this

events
unit - a unit enter region 001 <gen>
unit - a unit begin casting abillity

will the trigger only run if
a unit walk into the region and casting the abillity
or
will it run if a unit walk into the region
or casting the abillity
understand?
 
Level 5
Joined
Nov 6, 2008
Messages
150
is there a way to make it

unit - a unit enter region 001 <gen>
and
unit - a unit begin casting abillity
so it checking both?
 
Not realy.
Both events fire in the millisecond they happen and it's impossible to have two things at the same time. You could, via hashtable, store a boolean at the unit if it's in the region, something like:
  • Event:Unit - A unit enters region001<gen>
  • Action: Hashtable - Store boolean of (true) as 0 of Key(TriggeringUnit) in hashtable
Doing the same with a false boolean while leaving will allow you to check the boolean on spell cast.
 
Status
Not open for further replies.
Top