OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Uldics on 21 May 2005, 15:34:57

Title: Same mission MP and SP with playersNumber
Post 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?
Title: Re:Same mission MP and SP with playersNumber
Post by: Planck on 21 May 2005, 15:43:09
I think this command is only for MP, it counts players, and in SP there is only one player.


Planck
Title: Re:Same mission MP and SP with playersNumber
Post by: Uldics on 21 May 2005, 15:47:09
And there is my problem - there is one player, but command returns zero.
Title: Re:Same mission MP and SP with playersNumber
Post by: Planck on 21 May 2005, 15:49:11
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
Title: Re:Same mission MP and SP with playersNumber
Post by: Uldics on 21 May 2005, 16:16:47
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.
Title: Re:Same mission MP and SP with playersNumber
Post by: Planck on 21 May 2005, 16:25:15
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
Title: Re:Same mission MP and SP with playersNumber
Post by: Uldics on 21 May 2005, 16:49:22
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.
Title: Re:Same mission MP and SP with playersNumber
Post by: Planck on 21 May 2005, 16:52:54
Hey ......good job   ;D ;D



Planck