I want to get a list of all players in a game by pressing a key.
Ok, so in a typical class, lets say mutator, you can use the following code:
Well from my understanding, this doesn't work in the interactions class, and this is what I've come up with for there:
Problem is, this only lists players that are in direct line of sight, or behind one wall. If a player is clear across the map in CTF, it does not list them until I get close to them.
End result, I want a list of all players in the interaction class. I don't know if there's a way to pull in info from another class function or anything. Thanks for any help you can provide.
Ok, so in a typical class, lets say mutator, you can use the following code:
PHP Code:
for( C = Level.ControllerList; C != None; C = C.nextController ) {
if( C.IsA('PlayerController') || C.IsA('xBot')) {
LOG("Player: "$C.PlayerReplicationInfo.PlayerName);
}
}
PHP Code:
foreach ViewportOwner.Actor.DynamicActors(class'Pawn', P) {
viewportowner.Actor.Pawn.ClientMessage("Player: "$P.PlayerReplicationInfo.PlayerName);
}
End result, I want a list of all players in the interaction class. I don't know if there's a way to pull in info from another class function or anything. Thanks for any help you can provide.
Comment