View Single Post
  #5  
Old 08-09-2012, 03:06 PM
frantic69 frantic69 is offline
Approved Member
 
Join Date: Mar 2010
Posts: 17
Default

hello Kodiak,

Thank you. I saw that there is only few possibilities in the standard action. My goal was to spawn some aircraft when the player altitude goes over 400 ft.

I am able to have the altitude of the player. The variable is I_Altitude. I can easily show this altitude on the screen thanks to the GamePlay.gpHUDLogCenter(" ALT: " + I_Altitude.ToString("0.00")); line.

All this altitude stuff are done in the ontickgame function.

So, tell me if I am wrong but I tried to spawn the enemy aircraft thanks to following script :

if (I_Altitude > 400)
{
GamePlay.gpHUDLogCenter("above 400");
AiAction action = GamePlay.gpGetAction(maddox.game.ActorName.Full(mi ssionNumber, shortName));
if (action != null)
{
action.Do();
}

Could you confirm that we can spawn an aircraft thank to the line above ?

If yes, how can I manage to use it in the ontickgame function ?

Basically, I don't want to spawn an aircraft after a given time or when someone enter a specific area. I just want to spawn an aircraft when the player altitude is over 400 ft.

Sorry for my dumb question.
Reply With Quote