HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

help needed to find players that are not present

06-15-2004, 01:07 AM#1
Evaporaterr
i'm not sure how to find players that are not being used/occupied by a 'live' player..

CODE:

Set totalplayers = (Number of players in (All players controlled by a User player))

Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Equal to None
Then - Actions
Set totalplayers = (totalplayers - 1)
Else - Actions
Do nothing
06-15-2004, 03:00 AM#2
Deathperception
Simple based on what you have here you want it to set the integer to -1 if the player is not there so what you would do is this. In the If - Conditions you would put

(Player 1 (Red) slot status) Equal to Is unused.
or whatever player you wish

Or if you would like it to add to the integer if the player is there you would put
(Player 1 (Red) slot status) Equal to Is playing.

Hope this helps :D . This condition however will not work if a computer is controlling that slot. But since you specify where the computer is and where the live user is this is not a problem.
06-15-2004, 05:33 AM#3
Evaporaterr
i *think* i am able to get only playing players by using this :

For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Player((Integer A))) controller) Equal to User
((Player((Integer A))) slot status) Equal to Is playing
Then - Actions
Set totalplayers = (totalplayers + 1)
Else - Actions
Do nothing

if i were to do what you said, i'd have to make an action for every player (12 players) ... ouch ^_^