Jump to content
Sign in to follow this  
Guest JeanLuc_

Is there an "otherwise" clause ?

Recommended Posts

Guest Calb

I need to detect 3 states:Case Value=0 "Smile"Case Value=1 "Frown"OTHERWISE "Bury face in hands"I can't find any XML examples like this construct anywhere. Does it exist?Or maybe I should be using the if{} construct ?Cal - CYXXVE7LZZObvious Newbie

Share this post


Link to post
Share on other sites

Hi,You can use a lot of 'sAn example:If condition=0 then 0 (>L:condition,enum)If condition=better then 1 (>L:condition,enum)If condition=much better then 2 (>L:condition,enum)If condition=best then 3 (>L:condition,enum)etc.now let the bitmaps change by:<(L:condition,enum)If condition=0 then 0 (>L:condition,enum)If condition=better then 1 (>L:condition,enum)If condition=much better then 2 (>L:condition,enum)If condition=best then 3 (>L:condition,enum)etc.(L:condition,enum)Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites
Guest Calb

Thanks Jan,This confirms the conclusion I've reached.Just getting started. I find information on basic XML gauge programming is scattered and seems a bit sketchy about this kind of logic.But I'll keep plugging away and re-reading the tutorials and examples and hopefully it will sink in.Cal

Share this post


Link to post
Share on other sites

>I need to detect 3 states:>>Case Value=0> "Smile">Case Value=1> "Frown">OTHERWISE> "Bury face in hands">>I can't find any XML examples like this construct anywhere.>Does it exist?>>Or maybe I should be using the if{} construct ?>>Cal - CYXX>VE7LZZ>Obvious NewbieHi,The OTHERWISE can be implicit placing a default bmp in the -For example:SCRIPT"Smile""Frown"etcAny value returned by SCRIPT different from 1 or 2 will make the element show the default image.Tom

Share this post


Link to post
Share on other sites
Guest Calb

Oooops, forgot to post a reply to Tom.Thanks Tom. That's essentially what I ended up doing with a separate Element for each condition of each gear.In my case, gear down is green, gear in transit is red and gear up is no lights. Your use of the word, 'implicit' was the key.Cal - CYXXVE7LZZ

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