Jump to content
Sign in to follow this  
Guest Karl R Pettersen

'Nested' if's inside multiclick area trouble (xml)

Recommended Posts

Guest Karl R Pettersen

Setting up separate functions for drag, rightclick, and mouseleave events seemed like a simple task with MS pretty good gps examples. However, this one puzzles me. What I want is this: On leftdrag a state is stored to my own variable, another of my variables is turned off while panning around, and reset to it's previous state when a 'leave' event is excecuted. The big problem seem to be the nesting of if words. Other clickspots sets the two setting variables, and this one does the multiclick 'thing':(M:Event) 'LeftDrag' scmp 0 == if{ (L:Headbobbing,bool) if{ 1 (>L:HeadbobbingBackOn,bool) 0 (>L:Headbobbing,bool) } (M:Y) 1000 / 0 max 1 min 8000 * 1500 - (>K:AXIS_PAN_PITCH) (M:X) 1000 / 0 max 1 min 1 r - 24000 * 12000 - (>K:AXIS_PAN_HEADING) }(M:Event) 'Leave' scmp 0 == if{ (L:Headreset,bool) if{ 0 (>K:AXIS_PAN_PITCH) 0 (>K:AXIS_PAN_HEADING) } (L:HeadbobbingBackOn,bool) if{ (1 (>L:Headbobbing,bool) } }If you look at the 'leave' code, I am only able to perform one of the tasks that it does; change it around and it will perform one of the settings, but not the axis reset. What is going on here? Anyone have a workaround for achieving the same thing?

Share this post


Link to post
Share on other sites
Guest Karl R Pettersen

Nobody knows (read: bump)?

Share this post


Link to post
Share on other sites
Guest Karl R Pettersen

Although I am "pretty sure" that I've sorted this typo out without gaining any better success, I need to wait a few days before I can check it out. Have a new pc arriving. I'll get back to you then. Thanks anyway.

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...