| 08-05-2002, 03:09 AM | #1 |
Guest | :confused: hey, it me , can sum1 help me wiht this question? ok, here it is, when a unit enters a region that activates a timer (like the anti camp in commando wars) it starts good. but when another unit comes in, another timer shows up like normal(in my map) BUT restarts the first timer. can anyone help w/ that? thanks loser50 (b.net) |
| 08-05-2002, 03:43 AM | #2 |
What is appears is happening is that you have one timer (or timer variable), and you are using just it. Whenever a unit enters the region, it sets that one timer to the starting value. It appears that there are two timers because there there are two windows; in reality, those windows both point to the exact same timer. Solution: If you need multiple timers, use an array. Each time the trigger runs, add 1 to an integer varible, and use YourTimerVariable(YourIntegerVariable) when you refer to the timer. Determine the max amount of timers possible (absolute max 1024), and whenever YourIntegerVarible is greater than that number, set it back to 0. Using the timers in events may be tricky; I don't have War3 here to test it out on. If you can't get that to work, or don't need multiple timers at one time, have the trigger turn itself off, and have it turned back on once the timer expires. |
