Spad.Next LVAR for Yoke Rocker Trim Switch
-
Hi there. Does anyone know how to create a new variable or how to find the variable of the electrical trim switch located on the yoke -in the sim- in Spad.Next? I didn't find anything after 2 hours, would like to use the rocker switch on my actual yoke, trim up/down with creating a condition to work only when electric trim switch is set to on is a good bypass, but it breaks the immersion since the acutal rocker switch is not moving on the yoke but rather the trim wheel.
-
@GreenHat it's really simple. These are the scripts I use to operate the trim rocker on the yoke, inspired by the code of the virtual cockpit rocker switch (understand: most of it is blatantly copied from the aircraft files) :)
up (actually not sure which one's up or down, you'll have to try):
8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool) (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and (L:var_PitchTrimPower, bool) and if{ (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 + 16383 min -16383 max (>K:ELEVATOR_TRIM_SET) } 1 (>A:CIRCUIT SWITCH ON:52, bool)
down:
8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool) (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and (L:var_PitchTrimPower, bool) and if{ (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 - 16383 min -16383 max (>K:ELEVATOR_TRIM_SET) } 1 (>A:CIRCUIT SWITCH ON:52, bool)
middle position (or on release of either of the above):
0 (>A:CIRCUIT SWITCH ON:52, bool)
-
Currently trying to implement the script you provided. Spad.Next rejects it with the following error message: (1,4) error CS1525: Unexpected symbol '>'
I am trying to add the script under the Extra (plus symbol) tab->>Scripts->>Add Scripts.
Any ideas?
-
@Randolf Definitely. It requires .cs file fromat, I suspected it won't be as easy as saving the script in text editor then renaming it to FILENAME.cs.
Currently browsing the forums to how to even create a script.... I never did such thing, used to modify existing ones back in the days for FSX and GTA:SA, but those were different times.
Anyways, thanks for your help, I will figure this out from this point.