HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to Make Accurate Waits for multi

05-01-2003, 12:46 AM#1
fr0ggE
Hi, I'm wrapping up a 3 player comedy rpg with TONS of cinematics. When i first made the map i was lazy and did everything single-player-ish for all the wait functions. Now I want to take all the dialogues to multiplayer. How do i do this and keep the timing accurate?
05-01-2003, 06:47 AM#2
MicrosoftXP
i think CBWhiz has a utility for this. never used it though so can't say anything for how good it works. Link should be in his sig.
05-01-2003, 06:55 AM#3
Danexx
IF YOU MAP HAVE 3 PLAYERS ~~
LOOP WAIT ACTION 3TIMES ~
05-01-2003, 09:44 PM#4
fr0ggE
XP: the link of his sig didn't work emote_confused

Danexx: yes, i could also just make all the times thrice what they should be, but i'd like it to work for any number of players in the game.

I looked at the Princess Prophecy map and tried to emulate what it did.

For a given transmisson from a unit here's what it looks like:

---
Add 1 second (in the transmission part)

for every integer from 1 to numplayers, wait X seconds)
---

this doesn't seem to work cuz the dialogue seems to stop running and then it will wait the X seconds for the next one. What am i supposed to do. I want these dialogues to be precise. I don't want to just make all the times rather long on each one which i think PP did.
05-02-2003, 05:26 PM#5
MicrosoftXP
i know u wont want to do this because its messy but its guaranteed to work 100% of the time with any number of players and theres no extra code/variables/crap to mess with...

1 wait per trigger. split your cinematic trigger into like 20 or so.
05-02-2003, 05:48 PM#6
DaKaN
just remember you can only have 1 wait per trigger....
05-02-2003, 10:32 PM#7
SilentSpyder
Curious, whats your way of linking these seperate triggers? Do you just "Run Trigger", or something else. I think there's a trigger que trigger, I don't have WE in front of me right now, so I can't check, but if there is, how does it work?
05-02-2003, 11:55 PM#8
DaKaN
i used to link them with a "trigger execute (trigger varible)"

but using 2 triggers and alot of IF THEN's i was able to compress 15+ cinematic triggers into 1.. (but it can only be done in JASS...)

//=========Example
function FirstCin takes nothing returns nothing
local integer i = 1

if (udg_CinCounter == 1) then
...actions for this cinema first part....
loop
exitwhen i > udg_nump
call TriggerSleepAction(X.XX)
set i = i + 1
endloop

if (udg_CinCounter == 2) then
...actions for this cinema 2nd part....
loop
exitwhen i > udg_nump
call TriggerSleepAction(X.XX)
set i = i + 1
endloop

if (udg_CinCounter == 3) then
...actions for this cinema 3rd part....
loop
exitwhen i > udg_nump
call TriggerSleepAction(X.XX)
set i = i + 1
endloop

call TriggerExecute(gg_trg_CinCounter)

endfunction
//=========End Example

tigger CinCounter will just set udg_CinCounter = udg_CinCounter + 1 and then check to see if the it reached the last spot (like if there are only 16 steps to the cinema, stop if udg_CinCounter == 16) other wise it will just run the cinema function again... it works fine with the "wait bug"
05-03-2003, 08:42 PM#9
ChrydGod
why not just use timers ?

Make a timer array lets say cinematictimer[]

then do this :

1rst cinematic :

events :
*initial event*
conditions :
none
actions :
countdown timer - start cinematictimer[1] as a one shot timer that will expire in *duration of the 1rst cinematic*
*run cinematic 1*

2nd cinematic :

events :
Timer - cinematictimer[1] expires
conditions :
none
actions :
countdown timer - start cinematictimer[2] as a one shot timer that will expire in *duration of the 2nd cinematic*
*run cinematic 2*

etc ......

It seems quite easy and can even be made into a loop if you use the run trigger action


I hope this helped
Regards.
05-03-2003, 09:24 PM#10
DaKaN
timers, wait loops, its just a matter of preference, and i just perfer this way =)