OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: axek on 28 Jul 2003, 01:32:21

Title: Number of humans playing?
Post by: axek 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.
Title: Re:Number of humans playing?
Post by: Rubble_Maker 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


Title: Re:Number of humans playing?
Post by: PheliCan 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.