I succesfully got a timer to show, and destroy after buttons/check boxes are used. But I am unable to make an event occur after a Timer expires. Any help would be appreciated. Here is my work so far.
The first code is a segment of code of me creating the timer (it shows and I am able to manipulate the timer window using codes for check boxes.
The second code is the whole triggger. This is where I have my probelm. I cant get these actions to occur after this set event.
Instead of starting a "new timer" and then setting the variable as last created timer, just start the timer itself.. It shouldn't really make any difference, but this is how usually do it and it always works for me, sometimes these small things make the difference.
Yea, it's because you reassigned the BanTimer to a new timer. I'll try to explain how variables and objects within them work.
Every timer in the game has a number, it's handle id. This number is unique and doesn't have anything to do with the variable the timer is saved in.
So when you create a global timer variable (BanTimer) then the game will also create a new timer, called Timer001. That happens right at map initialization.
BanTimer now points to the timer Timer001.
When you start a (new timer) as you're doing in your trigger, then the game will create a new timer, called Timer002. After that you set BanTimer to the new timer.
BanTimer now points to the timer Timer002.
Now, the point is that events are actually only set-up ONCE (namely right at map initialization). So at map initialization you tell the trigger to run everytime BanTimer expires. At the time of map inizialization BanTimer points to Timer001. So the trigger will only run when Timer001 expires. It doesn't matter if you change the content of BanTimer, because at the time the event has set-up it had the value Timer001.
So you have 2 ways of changing that:
Either you don't start a new timer, but just start BanTimer.
Or you set your event to "Any timer expires" and add a condition that the timer has to be BanTimer.
I succesfully got a timer to show, and destroy after buttons/check boxes are used. But I am unable to make an event occur after a Timer expires. Any help would be appreciated. Here is my work so far.
The first code is a segment of code of me creating the timer (it shows and I am able to manipulate the timer window using codes for check boxes.
The second code is the whole triggger. This is where I have my probelm. I cant get these actions to occur after this set event.
Variables are global.
dunno. it should work so far i can see...I know 1 easy work around.
add a "wait" command of 30 sec below code 1 and past code 2 under it :P
Instead of starting a "new timer" and then setting the variable as last created timer, just start the timer itself.. It shouldn't really make any difference, but this is how usually do it and it always works for me, sometimes these small things make the difference.
Yea, it's because you reassigned the BanTimer to a new timer. I'll try to explain how variables and objects within them work.
Every timer in the game has a number, it's handle id. This number is unique and doesn't have anything to do with the variable the timer is saved in.
So when you create a global timer variable (BanTimer) then the game will also create a new timer, called Timer001. That happens right at map initialization.
BanTimer now points to the timer Timer001.
When you start a (new timer) as you're doing in your trigger, then the game will create a new timer, called Timer002. After that you set BanTimer to the new timer.
BanTimer now points to the timer Timer002.
Now, the point is that events are actually only set-up ONCE (namely right at map initialization). So at map initialization you tell the trigger to run everytime BanTimer expires. At the time of map inizialization BanTimer points to Timer001. So the trigger will only run when Timer001 expires. It doesn't matter if you change the content of BanTimer, because at the time the event has set-up it had the value Timer001.
So you have 2 ways of changing that:
Either you don't start a new timer, but just start BanTimer.
Or you set your event to "Any timer expires" and add a condition that the timer has to be BanTimer.