| 04-17-2006, 01:42 PM | #1 |
Ok basically the purpose of this is. In my arena I have rounds, which are meatn to be fairly short. Often players start trying to flee in circles, avoiding attacks which can make rounds last to long. I made it so slowly fire starts spawning on the edges and slowly expanding inwards shrinking the arena overtime. So if the round lasts to long the arena becomes smaller and smaller, so there is no where to run. If players are still alive the fire will eventually reach the center burning every1, so the guy on the higest hitpoints will survive and win. Firstly I made lots of regions where I want the fires to spawn Trigger 1, I set each region to a variable Trigger: ![]() Map initialization![]() Set FireRect[1] = Fire001 <gen>![]() Set FireRect[2] = Fire002 <gen>![]() Set FireRect[3] = Fire003 <gen>Creating The Fire trigger When a round is in progress I set RoundinProgress = true When a round finishess I set RoundinProgress = false The fire seems to work generally fine, but sometimes it goes funny, doesnt work some rounds, stops suddenly half way during over rounds I have a trigger that does when a hero becomes revivable, and his whole team is dead, end the round When round is off, after 30 seconds (time to buy stuff) it reactivates. Is there anything wrong with these triggers? Or will I need to post the activate/deactivate rounds trigger, (They are very long) |
| 04-17-2006, 01:54 PM | #2 |
Shouldn't that be a game time wait? Try 'wait 1.5 game seconds', instead (1.5 because game seconds a bit shorter). I can't see any problems, apart from maybe the wait in the loop, which I tend to avoid, but that could just be a random thing on my part. |
| 04-17-2006, 02:26 PM | #3 |
Are you using a 'For each Integer A' loop anywhere else in your map? |
| 04-17-2006, 04:22 PM | #4 | |
Quote:
Can that cause problems?? |
| 04-17-2006, 04:32 PM | #5 |
Yes. The 'Integer A' is a global variable, meaning that if another trigger uses an Integer A loop while your 'Compressing Arena' trigger is running, the value of Integer A will be change and may cause your loop to function incorrectly. Edit: It's quite simple to fix with a local variable. |
| 04-17-2006, 05:15 PM | #6 | |
Quote:
If you look at the Warcraft engine, you will notice that only one trigger can run at a time. If that trigger runs some other trigger, the first trigger will pause until the second trigger is done or is at a "Wait" action. So that can not likely be the problem.. - Soultaker |
| 04-17-2006, 05:17 PM | #7 |
Yes, it can be the problem, as he is using waits inside his trigger. When a thread is running and it reaches a wait, other threads can run in the waiting time, as far as I know. |
| 04-17-2006, 05:33 PM | #8 |
Ah, yeah.. I misunderstod the point completely.. You should just make the counter a local variable then.. all through then you would properly have to remake the whole thing in JASS. - Soultaker |
| 04-17-2006, 10:32 PM | #9 |
There's a GUI function called 'For Each Integer Variable - Do Multiple Actions, which lets you input your own global variable in there. As long as you aren't using that variable anywhere else it would work, and you wouldn't have to mess with combining JASS and GUI in the same trigger. |
