Home   Help Search Login Register  

Author Topic: Number of humans playing?  (Read 1165 times)

0 Members and 1 Guest are viewing this topic.

Offline axek

  • Members
  • *
  • I'm a llama!
Number of humans playing?
« on: 28 Jul 2003, 01:32:21 »
Hey Everyone,

  I'm creating a mission where each playable character is in his own group.  There are other AI driven west characters in the mission too.

  How should I go about determining how many humans are actually playing?  Would it be to assign a unique group name in the init field for each playable character, then check the number of alive units in those groups, on mission start?

  Or is there another way?

  Is there a way to determine if a playable position is being filled by the AI?

Cheers,
Axek.

Rubble_Maker

  • Guest
Re:Number of humans playing?
« Reply #1 on: 28 Jul 2003, 03:16:35 »
Try this:

[init.sqs]

?format ["%1",players]=="scalar bool array string":goto "new"
players=players+1
publicVariable "players"
EXIT



#new
   players=1
   publicVariable "players"
   EXIT



PheliCan

  • Guest
Re:Number of humans playing?
« Reply #2 on: 28 Jul 2003, 16:42:03 »
Unless you have set any units skill to 1, players are the only ones that have skill = 1.