![]() |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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
}
|
|
#3
|
|||
|
|||
|
ok thanks again
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|