| 09-10-2002, 07:52 PM | #1 |
Guest | I've been working on a map lately (of course) and I've found an interesting problem, which I believe might be an error in WE. My objective is to use timers to spawn units at different rates based on various play conditions. This was easy enough, but it requires about 16 triggers to fulfill all variations. After looking at it today, I realized that I could quite possibly reduce this to 4 triggers with the simple use of some variables - instead of switching triggers on and off with condition changes, just change the variable of the timer. Simple enough, right? HOWEVER - WE does not seem to recognize that I have created any variables of type Real - which the "Periodic Time Event" uses. When I select the time value to change it, the dropdown gives the "no variables of this type generated" thing. I tried Integer and Real variables, with and without default values. WE refuses to acknowledge that I have any variables of the sort generated. I'm wondering if other people have encountered this, or if I'm missing something obvious here? I'm going to delve into CT'ing my trigger and seeing if I can get it to work that way. |
| 09-10-2002, 07:54 PM | #2 |
You need to set a timer equal to another timer....I'd say just start it again with the lesser number...(assuming that works, I haven't run into that problem myself) |
| 09-10-2002, 08:11 PM | #3 | |
Guest | Quote:
That won't work - I'm talking about the value you pass to the time - periodic event, such as 25.00 seconds. I would LIKE to pass a variable to it, and it SHOULD take a Real, but even if I have Reals created (ctrl-b), it doesn't recognize that I have any. Currently I just have sets of triggers, each with a different time value. When something in the map happens, I have to check and see what the current timer is set to, shut that timer off, turn the next one on, and then set the variable that tells me what the timer setting is. It's annoying, heh. |
| 09-10-2002, 08:22 PM | #4 |
Ah, you can't use variables in any events, well, you can, but you can't change it after you set it (using goldenurg trigger patch; you can add an event with a variable but if you change the variable it won't update the event) I thought you were talking about countdown timers. |
| 09-10-2002, 08:34 PM | #5 | |
Guest | Quote:
Hmm...let me see if I understand this. Say I have a trigger that fires every 45 seconds. If a certain building is destroyed, I want it to change to firing every 30 seconds. If I based the trigger on the variable Timer, initially set to 45, then changed Timer on the destruction of that building to 30, it would still trigger at 45 second intervals? (non-updated event) I think I understand why, but that's minorly annoying. Means my bunches of timers will need to remain :\ |
| 09-10-2002, 09:00 PM | #6 |
Guest | The events for a trigger are registered (usually at map initialization) with the game. Once it's registered the values used for that event are set. If you want to change it, you have to register another trigger. |
| 09-10-2002, 09:27 PM | #7 |
Just let it fire every 15 seconds. In the trigger you must check an integer variable if the actions shall be run or not. Example: If you want it to run every 45 seconds: First run: do nothing Second run: do nothing Third run: Do the Actions Forth run: like first run Now, when you change it to run on every 30 seconds: First run: do nothing Second run: Do the Actions and so on. So you can have all multiple delays of 15 seconds. If you want it more precise, just decrease the 15 to any other number. I hope you get what I wrote, coz it's really late over here. *yawn* BTW: You can check the trigger's execution count or you can have an integer variable that increments every time the trigger is called. Like you want. |
