HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

set variable for timer...

09-19-2003, 02:25 AM#1
Ironboy
i have this
Time - Every 95.00 seconds of game time


and i want to set "95" as a variable

so I can increment it as time goes by adding var + 1 after it's executed each time.


how can I set such a variable?

i tried string, real, integer, and none worked :(


can? or can't?
09-19-2003, 02:33 AM#2
Eternal-Agony
What exactly are you trying to do? Do you want a timer that increases its expiration time each time it expires? (Lol say that 10 times fast)
09-19-2003, 02:38 AM#3
Norbo
I know what your saying.. To fix it, you have to (post-initialization) use the action "Add Event". Then, you'll be able to select a real variable.
09-19-2003, 02:52 AM#4
Ironboy
post-initialization??
09-19-2003, 03:13 AM#5
Eternal-Agony
post-
prefix
1.) After; later: postmillennial.
2.) Behind; posterior to: postaxial.

Initialization-
tr.v.
1.) To set (a starting value of a variable).
2.) To prepare (a Warcraft Map) for use; boot.
3.) To format (a storage medium, such as a disk).
09-19-2003, 03:42 AM#6
Ironboy
Quote:
Originally posted by Eternal-Agony
post-
prefix
1.) After; later: postmillennial.
2.) Behind; posterior to: postaxial.

Initialization-
tr.v.
1.) To set (a starting value of a variable).
2.) To prepare (a Warcraft Map) for use; boot.
3.) To format (a storage medium, such as a disk). 1.) After; later: postmillennial.



wtf!?!?

could you guys please be more specify?!

or is it just impossible to set variable in periodic timing event?!
09-19-2003, 04:46 AM#7
Ironboy
so, impossible?!
09-19-2003, 05:19 AM#8
Saethori
Add a trigger through triggers.

For example, add this:

Trigger - Initialize Timer
Event - [Time - Time Elapsed] - Elapsed game time is 1 seconds.
Condition - None
Action - [Trigger - Add New Event] - Add to Timer the event [Time - Every 'Timer' seconds of game time]
Action - [Trigger - Turn On] - Turn on Timer

Trigger - Timer (initially off)
Event - None
Condition - None
Action - [Set Variable] - Set 'Timer' to 'Timer' + 5
Action - Whatever else is supposed to happen..


By the way, for this to work, you must (of course) preset the 'timer' variable using the Variables function. Default to whatever you want, type must be 'Real'.
09-19-2003, 06:52 AM#9
Eternal-Agony
Here, its an easier way. I also haven't found a way to use a variable for a periodic event... X_x
09-19-2003, 06:41 PM#10
RodOfNOD
I didnt look at eternals but just use the unit DEATH timers.

I dont have WE open but there is an action that allows you to set a death timer for a unit you created. You could do this and then have your trigger be:

Event: Unit dies
Cond: Unit Type = SPECIALTIMERUNIT

then if you want to increment the next time to trigger this event you just increment the length of the death to unit.

If this isnt clear let me know I will get out the WE :>

Good Luck