| 07-03-2006, 09:09 PM | #2 |
How long is the generic timer by the way? Anyway, replace the wait with a game time wait, and see if that solves it (never use normal waits, except for stuff like wait 0.00). |
| 07-03-2006, 09:32 PM | #3 |
Generic_Timer is a global. Make sure it isn't tripping over itself and that you're not starting it too many times before it expires the first time. Starting the same timer several times before the first iteration has completed can usually lead to lag and other issues. I realize that starting a started timer simply restarts it, but if you do it too many times (possible dependent on creeps), then it will never run properly. Other than that, what Griff said. Polled Waits, not TriggerSleeps. :P |
| 07-04-2006, 09:15 AM | #5 |
Trigger: Countdown Timer - Start Generic_Timer as a One-shot timer that will expire in Start_Timer_Modifier seconds
![]() Set Start_Timer_Modifier = 8.00You realise your setting Start_Timer_Modifier after you try to use it? |
| 07-04-2006, 05:41 PM | #6 | |
Quote:
Ya this code is outdated since the timer is supposed to be 6 seconds and not 8. Silly to have left it in there I suppose :). Not my code though, I would never whip up something that shitty or redudant. I don't think the new trigger even uses that line. Anyway, been tinkering around with the trigger some more, but to no avail :(. |
| 07-04-2006, 06:00 PM | #7 |
That loop will mess up. Only decent solution is to use a JASS loop, using a local integer. At start: local integer i = 1 Then instead of For each integer A...: loop exitwhen i > 30 Then at the end of the loop: set i = i + 1 endloop |
| 07-04-2006, 06:06 PM | #8 |
I have no clue what a JASS loop is. So my next two questions are, what is the difference between the loops (why is this JASS one better?), and would anyone create this JASS loop for me or tell me what to do. |
| 07-04-2006, 06:26 PM | #9 |
There's a very large selection of JASS tutorials on this site. In particular Vex's and Blade's are valuable for beginners. You seem to be frequently running into the places where GUI goes from merely tedious to jumping naked into a dumpster full of syringes discarded by an AIDS clinic. These things don't have to be hard, give learning JASS a shot. |
| 07-04-2006, 10:25 PM | #11 |
exactly, there are only two loops you can do in GUI, for loop A and loop B if you use either of these at the same tiem as another, just the same as a global variable, they will cancel each other out and not work in JASS, what you can do is create a local integer, and loop through that its easy enough to understand, for ex. JASS:local integer i = 0 loop exitwhen i>10 call DO_ISH set i = i + 1 endloop not only can you loop through something like that, but you can also loop until something is true or false, etc. for ex. JASS:local unit u = GetTriggerUnit() loop exitwhen GetUnitState(u, UNIT_STATE_LIFE)<50 call PolledWait(.2) endloop call Do_ISH set u = null all MUI this is just another reason in the beggining of understanding why JASS is soo much better then GUI, hope you start taking learning is serious |
| 07-05-2006, 03:30 AM | #12 |
JASS:local integer i = 1 loop exitwhen i > 30 call PolledWait( 0.375 ) set udg_Player_Group = GetPlayersMatching(Condition(function Trig_Start_Level_Func011Func002002001)) call ForForce( udg_Player_Group, function Trig_Start_Level_Func011Func003A ) call DestroyForce(udg_Player_Group) set i = i + 1 endloop Well apparently I can, since it saved and looks to work. If for some reason I fucked something up, let me know please. Will test later to determine if this fixes problem. |
| 07-06-2006, 01:24 AM | #13 |
One problem cropped up and that was with this part: JASS:if ( not ( udg_Spawn_Loop <= ( 15 + ( udg_Difficulty[( GetConvertedPlayerId(GetEnumPlayer()) - 1 )] * 3 ) ) ) ) then When using the JASS loop this condition doesn't fire at all and it produces 30 creeps regardless of difficulty level. Can someone please fix that condition? Basically, the old loop used udg_spawn_loop and the condition stopped the loop once it reached a certain value, with that value being dependant on udg_difficulty. This new loop doesn't use that variable and thus the condition isn't doing shit since udg_spawn_loop isn't being used. Post 2: Hulk strikes again. SOlved the problem, only testing will tell if this solved Lag. Edited by Blade.dk. Reason: Double posting.. |
| 07-07-2006, 02:34 AM | #14 | |
Quote:
Can't you use for example one Integer variable for each player specific for this trigger ? Example : Red_Integer, Blue_Integer, Teal_Integer... and so on. So since you use one for each player they never can mess up, and since you also use them only in that trigger they won't mess up again... no? |
| 07-07-2006, 03:47 AM | #15 |
this is true, but again much easier in JASS, no globals needed |
