Home   Help Search Login Register  

Author Topic: Same mission MP and SP with playersNumber  (Read 1456 times)

0 Members and 1 Guest are viewing this topic.

Uldics

  • Guest
Same mission MP and SP with playersNumber
« 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?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Same mission MP and SP with playersNumber
« Reply #1 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
I know a little about a lot, and a lot about a little.

Uldics

  • Guest
Re:Same mission MP and SP with playersNumber
« Reply #2 on: 21 May 2005, 15:47:09 »
And there is my problem - there is one player, but command returns zero.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Same mission MP and SP with playersNumber
« Reply #3 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
I know a little about a lot, and a lot about a little.

Uldics

  • Guest
Re:Same mission MP and SP with playersNumber
« Reply #4 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.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Same mission MP and SP with playersNumber
« Reply #5 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
I know a little about a lot, and a lot about a little.

Uldics

  • Guest
Re:Same mission MP and SP with playersNumber
« Reply #6 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.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Same mission MP and SP with playersNumber
« Reply #7 on: 21 May 2005, 16:52:54 »
Hey ......good job   ;D ;D



Planck
I know a little about a lot, and a lot about a little.