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

wondering about events

Status
Not open for further replies.
Level 2
Joined
Mar 20, 2013
Messages
12
i'm just wondering how to have variable have variable index in the event?

if this is really part of the world editor, how about another way?
 
Level 2
Joined
Mar 20, 2013
Messages
12
i mean like: "Events - Timer[TimerIndex] expires."

how do i make the "TimerIndex" variable become the index of "Timer".

my problem is when i'm choosing the variable index, it shows:

"no variables of this type defined"

even though the "TimerIndex" is a Integer-type variable.

(I just thought to highlight my point)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
You cannot have variables or arrays in GUI event blocks, only via Trigger - Add Event To Trigger as Cakemaster mentioned. That is because you do not actually register the variable but the current value behind the variable, so if you change the contents of Timer/TimerIndex afterwards, that does not affect the event, it still refers to the timer object that it was in the beginning. If you want to stay GUI, you have to register all possible timers once and then filter via conditions.
 
Status
Not open for further replies.
Top