January 11, 200323 yr I am using the below to try and trigger an event at Gforce 1.I want the event to trigger when 1 is passed on the up or down.here is the code(A:G FORCE,Gforce) 1; if{ (>K:TOGGLE_WATER_RUDDER) } I have tried replacing the > with == but it has had no effect.How could I restructure this to get the desired effect.ThanksAl
January 11, 200323 yr Hi Al,I've never worked with G Force variables so I do not know if the variable itself is correct. However there's a bug in your code. Try this one:(A:G FORCE,Gforce) 1 == if{ (>K:TOGGLE_WATER_RUDDER) }Best RegardsMatthias
January 11, 200323 yr Tried it but it didn't trigger the event.the code below works, but it triggers the event constantly over 1g I need it only to trigger once per 1g pass.(A:G FORCE,Gforce) 1 > if{ (>K:TOGGLE_WATER_RUDDER) }Thanks for the help.Al
January 11, 200323 yr Hi Al,Well, Toggles just know two positions On or Off. In my or your code (doesn't matter which one) the Water Ruder Switch will be set to On when it was Off after passing 1g or it will be set to Off when the Toggle was on after passing 1g. However if your aircraft holds more than 1g the Toggle will also stay in it's switched position and will be switched back when the aircraft is below 1g. If you would like just a short event (for example the Water Ruders should just be on for about 1 second) you should use a timer. Also it would be good if you scan the position of the switch before it will be set by the code (could be done easy with a second If question).Best RegardsMatthias
January 11, 200323 yr Thanks for all your help.The problem is that the switch is toggling on/off repeatedly while it is above 1g as apposed to just switching once.I tried adding a second if statement, and it works soso.Will keep trying..ThanksAl
January 11, 200323 yr Okay, now I understand the problem. The solution should be very easy. Try this one:(A:G FORCE,Gforce) 1 > if{ 1 (>K:TOGGLE_WATER_RUDDER) } els{ 0 (>K:TOGGLE_WATER_RUDDER) }This code switches and holds the Water Ruder ON (1) when you're over 1g and switches back to Off (0) when you're below 1g.Hope it works.Best RegardsMatthias
Create an account or sign in to comment