![]() |
|
#1
|
|||
|
|||
![]()
Sorry i don't understand your question.
Do you want all Players in an Array? Code:
public Player[] AllPlayers() { List<Player> players = new List<Player>(); if (GamePlay.gpPlayer() != null) players.Add(GamePlay.gpPlayer()); if (GamePlay.gpRemotePlayers() != null) players.AddRange(GamePlay.gpRemotePlayers()); return players.ToArray(); } |
#2
|
|||
|
|||
![]()
if that kodiak thanks again.
what I wanted to know is if this form is well done or not Code:
public override void OnActorCreated(int missionNumber, string shortName, AiActor actor) { base.OnActorCreated(missionNumber, shortName, actor); if (actor is AiAircraft) { for (int i = 0; i < (actor as AiAircraft).Places(); i++ ) { if ((actor as AiAircraft).Player(i) != null) { p[indice].Nombre = (actor as AiAircraft).Player(i).Name(); p[indice].Estado = "Vivo"; p[indice].Valor = 0; //por ahora no lo uso, va a ser implementado en otros para los defectos del avion segun las tirada de dados de rol indice++; } } } } mains to thank |
#3
|
|||
|
|||
![]()
Ah ok, now i understand.
At event OnActorCreated is no human player available. There only 'empty' actors are created. A Player enters a plane (actor) with the OnPlaceEnter event: Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) { base.OnPlaceEnter(player, actor, placeIndex); //your code here } |
#4
|
|||
|
|||
![]()
ok thanks again
|
![]() |
|
|