#1
|
|||
|
|||
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? |
#2
|
|||
|
|||
-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 |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
Roger, will move to FMB forum
|
#5
|
|||
|
|||
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:
|
#6
|
|||
|
|||
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) Last edited by FG28_Kodiak; 05-25-2012 at 07:25 AM. |
#7
|
|||
|
|||
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, |
#8
|
|||
|
|||
meters, all return values are metric
|
|
|