- Messages
- 10,163
- Country

Hey all,
Im trying to enduce drag via a hidden gauge that turns on spoilers.
This is for an electric plane; the retracting air generator, and or prop regenerative breaking (turns to generator mode when throttle is off, enducing some slight drag).
I cant get the code to work for some reason. If I hit the / key, the plane slows, so I know Spoilers are working, but the code isn't. Any ideas what is wrong?
I have also tried 1 (>K:SPOILERS_OFF,bool) and this didn't work either.
I don't want to use SPOILERS_TOGGLE as I need to know if they are on/off. If they reload the plane in flight, it would mess up the on/off position logic, if I am correct.
NOTE: ON the top, it 'should' be and/or, but I don't know how that would be written. (Can one write and or ?) But, or should work fine, right? I tried using 'or' and also the || symbols.
Im trying to enduce drag via a hidden gauge that turns on spoilers.
This is for an electric plane; the retracting air generator, and or prop regenerative breaking (turns to generator mode when throttle is off, enducing some slight drag).
I cant get the code to work for some reason. If I hit the / key, the plane slows, so I know Spoilers are working, but the code isn't. Any ideas what is wrong?
Code:
<Update Hidden="Yes">
<!-- 1 SECOND UPDATE -->
(P:Absolute time,seconds) 1 % 1 > !
if{
(* XML script goes in here *)
(A:GENERAL ENG THROTTLE LEVER POSITION:1,percent) 3 <
(L:AVE WPAPU, bool) 1 ==
||
if{
(A:AIRSPEED INDICATED,knots) 20 >
if{
1 (>K:SPOILERS_ON)
}
}
els{ 0 }
</Update>
NEXT, below, different version//////////////////////////////
<Update Hidden="Yes">
<!-- 1 SECOND UPDATE -->
(P:Absolute time,seconds) 1 % 1 > !
if{
(* XML script goes in here *)
(A:GENERAL ENG THROTTLE LEVER POSITION:1,percent) 3 <
(L:AVE WPAPU, bool) 1 ==
||
if{
(A:AIRSPEED INDICATED,knots) 20 >
if{
1 (>K:SPOILERS_ON)
}
}
els{
1 (>K:SPOILERS_OFF)
}
</Update>
I have also tried 1 (>K:SPOILERS_OFF,bool) and this didn't work either.
I don't want to use SPOILERS_TOGGLE as I need to know if they are on/off. If they reload the plane in flight, it would mess up the on/off position logic, if I am correct.
NOTE: ON the top, it 'should' be and/or, but I don't know how that would be written. (Can one write and or ?) But, or should work fine, right? I tried using 'or' and also the || symbols.



It can happen LOL!
