Jump to content
Sign in to follow this  
rekrul

Weird MP behaviour (abrupt ending)

Recommended Posts

I've been making a simple mission where I have a group of west squads attacking Zelenogorsk that East insurgents are holding. I'm using the UPSMON script so I have 4-5 east infantry squads with random move, some have fortify, and then on west I have 4-5 squads with move.

I then have a boss guy with random fortify and I have a trigger that says if he's killed the east variable for surrender is 100% (so they will surrender if he's killed) and then an end trigger for the town (which covers the same area as the UPSMON marker) if seized by BLUFOR.

Now what happens is that if I die and my friend is still fighting, I just suddenly get the debrief screen and it ends the mission (no respawn). Or we could be in the middle of a fight and then mission ends. I have a hint for when the boss dies and it does take a few seconds before UPSMON checks and then surrenders but I get no notice of the boss' death and the game just ends.

Now I suck at tasks and debriefing so it's probably something missing there, but could the problem be related to triggers being run on the trigger as well? How do I make the triggers only serverside? On act = (!isServer) : exit or something, before the rest of the arguments?

Share this post


Link to post
Share on other sites
How do I make the triggers only serverside?

Add AND isServer to the condition field

my_condition AND isServer

Share this post


Link to post
Share on other sites

Thanks, but do you think it has an effect? I'm just reaching here as i was wondering if it had an effect. Do the clients themselves think that we have seized the town while still engaged in a firefight? And if so, would they cause the game to end? Once we experienced that the client just got the debriefing screen up while I, being the server, continued...

Share this post


Link to post
Share on other sites

The !(alive unit_name) is foolproof. It should work flawlessly in MP. A seized by trigger is also MP safe. There may be a delay of up to a minute before the trigger has fired on all computers though. Most likely caused by CPU lag.

Share this post


Link to post
Share on other sites

Hmm, ok. I should probably put some debug-hints in the triggers then.

Share this post


Link to post
Share on other sites

Well that didn't work well. I had blufor present as activation and in condition i had isServer and it immediately ended. Seems as no matter what the trigger was, if isServer is in condition then it immediately fires, even when previewing in editor.

Share this post


Link to post
Share on other sites

Thanks, I'll try. I just made another mission and again the end #1 trigger fired for me while my friend continued playing. Could this be because I have no debriefing?

Share this post


Link to post
Share on other sites

Another method is to run the server side check in the condition field:

if (isServer) then {my_command = true}

Share this post


Link to post
Share on other sites

Don't you mean in the on Act field?

Share this post


Link to post
Share on other sites

how big is the radius on the trigger that detects no more players alive ?

Is it covering everything ?

is it grouped to the leader ?

Share this post


Link to post
Share on other sites

I think it's 5000 x 5000 so it should cover everything. There's no "leader" apart from the squad-leader and it isn't grouped to him. Do I have I have to group it to him for it to work?

Share this post


Link to post
Share on other sites
I think it's 5000 x 5000 so it should cover everything. There's no "leader" apart from the squad-leader and it isn't grouped to him. Do I have I have to group it to him for it to work?

no not really - Its just another way of doing it :)

My guess then is to delete the trigger that detects all players dead and try a fresh one but leave the condition box alone for now :), then test it..

see if that works...

---------- Post added at 11:49 AM ---------- Previous post was at 11:45 AM ----------

Just a quick edit :)

Are you using anything like (Not(alive player)) at all ???

Share this post


Link to post
Share on other sites

No, the only place I have used "player" is in briefing.sqf. I've read that player is nullObj or something in MP and bad to use, so the trigger is BLUFOR not present and type is end #1. So it ends for me who is hosting but not my friend who is a client.

Share this post


Link to post
Share on other sites

As I said before... sometimes there's a delay between different computers in the same network. Stuff that happens on computer A happens a bit later on computer B. A complex mission causes longer delay. Are you sure this is not the case here?

Use Voice over net (or teamspeak) and see if things happens simultaneously on your comp and your friends perhaps?

Share this post


Link to post
Share on other sites
No, the only place I have used "player" is in briefing.sqf. I've read that player is nullObj or something in MP and bad to use, so the trigger is BLUFOR not present and type is end #1. So it ends for me who is hosting but not my friend who is a client.

tbh u don't need to detect if all players are dead because the mission will end automatically as soon as the last guy dies..

Share this post


Link to post
Share on other sites

Sorry, my bad. I'm mixing the two missions here. On the second mission I check for "seized by BLUFOR" on each city. If one city is seized I set a variable to true (already defined as false in init.sqf) and a hint that that city is seized, then I have an End #1 trigger where I have (variable_1 and variable_2) && isServer; in the condition field. I placed a hint message in the onAct field here as well.

Now yesterday after we had seized the first town, it took about 15 seconds from I got the message until the other guy did (we're using Skype) so nominesine is right about the delay. However for the 2nd city the hints both fired at the same time and I'm immediately in debriefing while my friend continues playing until I click Continue. Then we're both thrown back to the lobby.

I believe this is because I'm missing briefing.html with debriefing segments so I'm gonna try and make a real simple one, i.e. copy paste something.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×