Sign in to follow this  
Guest Karl R Pettersen

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

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

Karl, The "(" preceding the assignment of 1 to HeadBobbing,bool may be locking it up.. ???? (L:HeadbobbingBackOn,bool) if{ (1 (>L:Headbobbing,bool) }Regards,Roman

Share this post


Link to post
Share on other sites

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