FS2004 Capped switch function help please

#1
Hey guys, I have two switches in my model. A starter, and a coil boost. They are of the capped push-button type. I would like to have the cap closed as static image, then when you roll the mouse over it, the image changes to the cap lifted and the button exposed and then, you can push the button, and when you remove the mouse hand, the cap closes.
Being very green with XML, could someone help me with the code? I think I understand the button pressing part, it's the cap lift and static part I'm not sure how to write those events.

Thank you.

Doug

This is what I have, will that work?
 

Attachments

Last edited:

n4gix

Resource contributor
#2
Oy vey! I don't believe there is a way to detect whether the mouse is hovering over an defined area and triggering any action...

You will probably need to define a click area to "open" the cap, then another click area to control the button. You can use <Visibility> script to disable the button area unless the cap is open first.

The only mouse events possible require one or more of the following:

LeftAll
RightAll
MiddleAll
RightSingle
MiddleSingle
LeftSingle
RightDouble
MiddleDouble
LeftDouble
RightDrag
MiddleDrag
LeftDrag
Move
RightRelease
MiddleRelease
LeftRelease
WheelUp
WheelDown
Leave
 

tgibson

Resource contributor
#3
I use a two step process:

1. Lid closed - click and the lid opens.
2. Lid open - click and the button pushes.

Same click area, what happens depends on the state of the lid variable.

Hope this helps,
 
Top