OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Uldics on 21 May 2005, 15:34:57
-
I use following trigger condition to determine if all my players are in base
"_x in list basetrig" count [sol1,sol2,sol3,sol4,sol5,sol6,sol7,sol8,sol9]==playersNumber west
But it only works for MP, not SP and not in editor (I think the engine thinks editor as SP game), as the right side of condition returns 0. How do I make it work in both modes - MP and SP?
-
I think this command is only for MP, it counts players, and in SP there is only one player.
Planck
-
And there is my problem - there is one player, but command returns zero.
-
Not sure, but maybe the count start with 0.
I mean maybe the first player is #0, then #1.....etc
But its just a guess.
Planck
-
Tried it in MP, returns 1, if I run the ingame server and am alone. I just dont want to makepbo every time I just need to test my mission.
-
Well, I think it may not be possible for this command to work in SP.
Anyway, maybe one of the MP experts will be able to give you a better answer.
Planck
-
Ok I found the solution myself:
("_x in list basetrig" count [sol1,sol2,sol3,sol4,sol5,sol6,sol7,sol8,sol9]==playersNumber west and playersNumber west >0) or (local serverChk and local player and player in list basetrig)
All before "or" is for MP and all after "or" is for SP. "serverChk" is a game logic, which is only local on server. "player" is only local on players computer.
I think another solution can be replacing right side to:
playersNumber west==0 and player in list basetrig
This way we can actually check for MP or SP mode, mission is currently being played in.
-
Hey ......good job ;D ;D
Planck