• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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