Jump to content
Sign in to follow this  
aerostar

Mouse Event - Triggered by JOY Button

Recommended Posts

Hi, I'm trying to configure a ButtonBox button for the VS and FLC buttons on this aircraft.

It has about six functions triggered by the MouseClick on each of the VS, FLC buttons. I've tried but can't get them to work using LVARs.

Therefore I am trying to get the ButtonBox button to trigger as the Mouse Event does and execute the script as if the mouse button was clicked.

I've added in the Shaded Section in the script below, not having any real idea of what I'm doing...  can anyone advise if there is a way to do this properly or am I wasting my time.   Thanks

 

XML_Code_E50_P_AP.jpg

The Joystick name is what SPADnext lists it as...

Edited by aerostar

                        mustang_banner_newstar2777.png

 


 
 
 
 

Share this post


Link to post
Share on other sites

XML is reverse polish notation. That line should be:

	(M:Event) 'LeftSingle' scmp 0 ==
	(spad event) == or
	if{ rest of stuff to be done }
	

BTW if you use a {code}] prefix followed by a {/code} suffix (using square [ ] brackets!), then the code will be easier to read and copy/paste for replies. :biggrin:


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Hi Fr. Bill,  thanks for replying... 

I have tried this and many many other ideas over the past few days but can't seem to get it to work..  could it be that the script is inside a M:Event and only mouse will trigger it?   Thinking...  if I delete the mouse part of it and somehow make the script inside a Keyboard or Button Event would that work (if it's possible to make those as events)

 

P.S.  Was my first post , before the edited one above,  not shown because it had possible references in the LVARS to the aircraft maker ...  or something else,  just wondering

 

Edited by aerostar

                        mustang_banner_newstar2777.png

 


 
 
 
 

Share this post


Link to post
Share on other sites

What you are trying to do is simply not possible.  XML will never see actual hardware input from the joystick button as the sim doesn't expose those.  The closest you could come is to write something that sees a custom event come in, assign said custom event to the button vial spad.  I don't know if XML can see a custom event happen or not.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

An alternate way?
- Use fsuipc to trap the button box buttons and send to one or more lua files
- In the lua(s) rewrite the animation code in lua to do the work.. (fsuipc/lua supports the read/write of L:vars) 


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...