• 🏆 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!

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?
 
Level 13
Joined
Mar 16, 2008
Messages
941
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