[script] No Player join

O Ilusionista

Captain 100K
No Player Join

I made this code to prevent other players to join the game while you are playing. Useful for things like intro or when you want just one player on the screen for some time.

Second player will be able to choose the characters if he press start, but won't be able to join until you set the code off.

Code:
void noplayerJoin (int iG)
{
// controls if other players can join the game or not
// 1 - players CAN NOT join, 0 play CAN join
// remember to set it 0 when you are done, or you will have a 1P only game.
// Douglas Baldan/O Ilusionista - 20/09/14
changeopenborvariant("nojoin", iG);
}

usage:
@cmd noplayerJoin 1
To block other players to join

@cmd noplayerJoin 0
To set it off

You can put this code in a Empty entity and spawn it on the level, like this:

spawn  empty
@script
void main()
{
changeopenborvariant("nojoin",1);
}
@end_script
coords  180 189
at  0
 
It's a pretty interesting feature you got there, O! It looks like a new function for OpenBOR. I know this is going to be way too early to ask this last question, but, if there was going to be a VS fighting mode in OpenBOR, can/will the function be used for stopping players from joining like in X-Men VS Street Fighter? LOL You don't have to answer this last question, but we can save it for later.

EDIT: Forget about my questions I asked about changeopenborvariant 'cause I just found out now that it's available. Also I realized I have changeopenborvariant in a stage set. (I didn't look at it carefully. :P)
 
Back
Top Bottom