#Replicate mouse hold with momentary toggle switch, and in-game switch with no events

1 messages · Page 1 of 1 (latest)

next plinth
#

Hi, following on from my previous question about the Antonov AN-2 (it turned out the first button I was trying to use didn't have events, hence my confusion), I have 2 questions that I couldn't easily find answers for and hope someone can help me with.
The AN-2 has a few cockpit switches that require the user to hold down the mouse click in either direction, specifically the flywheel and the cowl/oil flaps. The problem I am having is that I can use the "On Hold" input setting to essentially functionally achieve this, but the in-game switches keep clicking back to resting position every few seconds which breaks the immersion. Is there any way to achieve replicating the mouse hold without the switch spamming its state?
My second question: Is there a way to bind an in-game switche that doesn't have events associated with it? In the AN-2 it seems everything does except the Battery Switch (which has 3 states).

Many thanks for any help or clarification on these 🙂

spark dragon
#

First question, do not use on hold. Use on press and on release. There should be appropriate code for the two states if holding the mouse button is how the virtual cockpit works.

#

Second question, in my experience every switch that can be operated in a virtual cockpit has associated code. It can be difficult sometimes to find it.

next plinth
# spark dragon First question, do not use on hold. Use on press and on release. There should be...

Thanks for the reply, unfortunately that's what I tried first, but when you assign it to a key it will pop back to resting position in game after second or two, even if not released on controls. So the hold input reset it so it would move back to being engaged with out me needing to use switch again. So I guess im asking is there a way to trick the sim into thinking my switch is a mouse hold, not just a button hold. Thanks

spark dragon
#

You need to show what code you are using for both on press and on release. I don't have that aircraft so I can't help you search for the correct code.

#

Does the button remain pressed when you hold the mouse clicked or does the virtual cockpit also release the button after a few seconds?

next plinth
#

Unfortunately I'm away from computer for week so cant give you code at this stage. But yes, the button in-game remains pressed if you hold it with the mouse click (you also drag the mouse in the direction). Cheers

spark dragon
next plinth
#

Thanks, i will try look for those when I get back next week, plus try give you more information on the Battery that didn't have any events shown like all the other buttons. I was using the basic code found in one of the tutorials for events, starting with: ">B:"

next plinth
#

Hi, sorry about delay. Here are the details of that button held in place by mouse. It's all a bit confusing to me being fairly new to this so sorry if a solution is obvious in there haha. Cheers

#

And here is that other switch that didn't seem to have any events associated with it: Thanks

spark dragon
#

For the battery master, the only useful thing I can pick up from your clip is

(>B:ELECTRICAL_Battery_1_Off)
(>B:ELECTRICAL_Battery_1_Battery)
(>B:ELECTRICAL_Battery_GPU)
#

I guess this is a three-position switch

next plinth
#

Awesome that fixed the battery switch thanks!
Can you see anything in the first 2 images that might be better code than the current one I am using, which causes the in-plane momentary switch to jump back after few seconds. I'm using (>B:ELECTRICAL_SWITCH_INTERNAL_CLUTCH_Set). Thanks for your help!

spark dragon
#

Hi, try these...

(>B:ELECTRICAL_SWITCH_INERTIAL_CLUTCH_LOW)

(>B:ELECTRICAL_SWITCH_INERTIAL_CLUTCH_MEDIUM)

(>B:ELECTRICAL_SWITCH_INERTIAL_CLUTCH_HIGH)