![]() |
strange behaviour of some function ( classes?)
Im havign a mission with my current mission wich is a little bit of a pain, since i think its not a code problem. ( i will psot the code later)
but the -ifplayercrashlanded -ifplayerlanded -playerisairbourne function / classes, give faulty resoults. some times i land, and the the trigger is not launched, others i crash land, and same happens (even with a basic "hello world" ), To overcome this i created a refly menu option who uses "player is airbourne function), yet some times im safe and sound on the ground and this still doesnt work :S this is kind of ruining my scripting efforts. Is this an ingame recurrent issue? |
-ifplayercrashlanded
depends on Location, if you crashed near or at a Airfield, its not triggered you get a regular landing. -ifplayerlanded Works normal for me in Single and Player hosted server, Problems sometimes on dedicated. -playerisairbourne works normal for me. Let me see your code, please |
code will be available here in a coupel of hours...
sorry admins, i posted this in the wrong place, can you move this to the FMB forum? thats were it was supposed to be in :S |
Roger, will move to FMB forum ;)
|
Thnaks blackdog!
Quote:
this function works perfectly for newly spawn planes, but if take a short circuit and land, or crash, it no longer works, im sitted in my plane and i get the ""Refly is not possible if Airbourne!"" crashlanded was working ok last night, but was giving issues the other one, Quote:
Quote:
|
For IsAirborne you can make your own
Simply check: (actor as AiAircraft).getParameter(part.ParameterTypes.Z_Alt itudeAGL, -1) (actor as AiAircraft).getParameter(part.ParameterTypes.Z_Vel ocityTAS, -1) First is Height over Ground, Second is True Airspeed in m/sec. So if for exampe Code:
(actor as AiAircraft).getParameter(part.ParameterTypes.Z_AltitudeAGL, -1) <= 1.0 Code:
(actor as AiAircraft).getParameter(part.ParameterTypes.Z_VelocityTAS, -1) <= 1.0 For checking if plane is Damaged you can use Code:
(actor as AiAircraft).getParameter(part.ParameterTypes.M_Health, -1) |
soudns amazing. so i can actually get in flight parameters fo the planes? that could be usefull for a lot of stuff!
i will work furthter on this tomorrow, no time today... :( is the 1.0 in meters and killometers? on the check speed and altitude? also does Quote:
thanks Kodiak, |
meters, all return values are metric
|
All times are GMT. The time now is 01:13 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.