| 12-13-2004, 11:52 PM | #1 |
I have a lot of wait commands in my map. For cinematics, messages, cameras, just about everything. SOMETIMES, in multiplayer online, the waits don't work. I am at a loss here, because I cannot figure out why it would wait sometimes, and not others. The timing on these elements is very critical! For example, the 4 second wait in this trigger didn't wait. Code:
Then - Actions
Trigger - Run TD4 Activity Start <gen> (checking conditions)
Wait 4.00 seconds
Cinematic - Clear the screen of text messages for (All players)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Player_Count Greater than 1
Then - Actions
Trigger - Run Start Battle <gen> (checking conditions)
Else - Actions
Trigger - Run Start Gallery <gen> (checking conditions)And this one? It works SOMETIMES, but all the small waits in between it sometimes skips. The platforms move super fast and the timing is all screwed up. Other times, it works OK. Code:
function Trig_Platforms_Move_Actions takes nothing returns nothing
local integer PLATFORM
set PLATFORM = GetRandomInt(1, 7)
if ( udg_Platform_Switches[PLATFORM] == 1) then
call ConditionalTriggerExecute( GetTriggeringTrigger() )
else
call DoNothing( )
endif
set udg_Platform_Switches[PLATFORM] = 1
call SetDestructableAnimationBJ( udg_Platforms[PLATFORM], "spell" )
call TriggerSleepAction( 2 )
call ChangeElevatorHeight( udg_Platforms[PLATFORM], 0 )
call TriggerSleepAction( .35 )
call ForGroupBJ( GetUnitsInRangeOfLocAll(230.00, GetDestructableLoc(udg_Platforms[PLATFORM])), function Trig_Platforms_Move_Func008002)
call DestroyGroup (GetLastCreatedGroup())
call TriggerSleepAction( 2.65 )
call ForGroupBJ( GetUnitsInRangeOfLocAll(230.00, GetDestructableLoc(udg_Platforms[PLATFORM])), function Trig_Platforms_Move_Func008002)
call DestroyGroup (GetLastCreatedGroup())
call ChangeElevatorHeight( udg_Platforms[PLATFORM], 3 )
call TriggerSleepAction( 2 )
set udg_Platform_Switches[PLATFORM] = 0
endfunctionCan anyone help me with this problem? See anything wrong? |
| 12-14-2004, 11:37 AM | #2 |
If u time the waits for single player thats how they will do it, but on a multiplayer map, i had these problems...i thought they fixed this but the wait is getting however many players there are, lets say 5 ...and lets say the wait was 10 seconds...it would divide it by the number of players...the way around it is to make a varible of the players and do like number of players = wait +1 (1 being the second and wait being a wait variable) if thats what u wanted :S |
| 12-15-2004, 05:39 PM | #3 |
how about using polled wait, also known as "Wait - Game Time"? |
| 12-15-2004, 05:54 PM | #4 | |
Quote:
Thout about that, but I'm not experienced using those. Will that induce lag or screw things up, if it waits for all players to complete the wait? |
| 12-15-2004, 05:59 PM | #5 |
well, I havent had any problems with them, the only thing is that they arent REALLY accurate, but its the best u can get ^^ they at least WAIT, unlike normal waits (I had same problem) |
| 12-15-2004, 08:04 PM | #6 |
I use solely polled waits in my game, and I have hosted it at least 500 times without a problem (actually, I've had many problems, but none related to polled waits). It doesn't cause any noticeable lag, though the time can be variable due to different speeds on PCs (not extremely variable though). |
| 12-15-2004, 08:22 PM | #7 |
That helps...that helps. What about the custom script, which is a complex situation. There may be several copies of that trigger running, each having waits. So there is more than one wait happening at a time. Eh? |
| 12-16-2004, 06:42 AM | #8 |
I can't say for sure there - I never have multiple waits going at once. I'm trying to envision a scenario where you would and I can't think of one, but maybe my creativity is shut down for the night. Maybe someone else can help you with multiple waits at once, though I would probably just try it and see if it caused problems :p |
| 12-16-2004, 08:37 PM | #9 |
The extra lag that comes with Polled Waits is incredibly unnoticeable, granted they are much more accurated than normal waits. though the most exact way is using timers and expiration events, not practical in many cases though |
| 12-17-2004, 06:14 AM | #10 |
Well, you know the event, 'Every x seconds of the game" I tried using a REAL variable, so I can make my platforms gradually move faster and faster. The editor will allow you to do this, but then the script doesn't compile or WC3 crashes. So I had to use a wait in that trigger, and waits to control the platforms. I have changed them to polled waits. Sometimes they work smoothly, sometimes it doesn't wait. Sigh. |
| 12-17-2004, 02:55 PM | #11 |
you could use a timer expires, for event, then running the timer, at X dead line, |
| 12-22-2004, 08:38 PM | #12 |
Which one would I use for a very common trigger, like, Unit - A unit dies If I wanted a sleep action in there, will a polled wait screw things up? |
