Jump to content
Sign in to follow this  
Guest wee_davie_2612

XML newbie needs help

Recommended Posts

Guest wee_davie_2612

Hey all,I'm having a little trouble with some XML gauges I'm trying to make and was wondering if anyone here can help me out?I'm trying to make 3 custom gauges to add to an existing panel. I'm trying to add COM1 TRANSMIT, COM2 TRANSMIT and COM RECIEVE ALL switches. The reason I'm having to do them from scratch and not hack up an existing gauge is two fold: 1. It needs to fit in with the panel (so all new bmp's) and 2. I can't find any to hack up :) Now to my problem. I can sucessfully get the switches to show up in the panel and they react correctly when I use a key assignment to switch them i.e. both the com1 and com2 switches flip to their opposite position (one goes up the other goes down) when I use a keystroke to change radios. The recieve all switch will also flip positions when I use the keystroke for that aswell. This makes me sure that I haven't messed up any variable names.The problem is that I can't click these with the mouse. I do however get the correct mouse symbol when I roll over the gauge (i.e. the pointing hand) but no reaction from the gauge to my clicking. This also includes no changing radios etc.Basically, in a nut shell, I've got a fully working switch but I can't click it.Anyone have any ideas (preferably in newbie language)?CheersDavidP.S. I edit them manually through notepad, incase anyone's wondering.

Share this post


Link to post
Share on other sites
Guest Karl R Pettersen

>Basically, in a nut shell, I've got a fully working switch but I can't click it.Well, then I guess you don't have a fully working switch :)Anyway, the switch code so far is needed to be able to give any help (although not promised :)).Uhhmm, where did the FS200_2 SDK page go? Anyone?

Share this post


Link to post
Share on other sites
Guest wee_davie_2612

Hey Karl,[a href=http://www.microsoft.com/games/flightsimulator/fs2002_downloads_sdk.asp]HERE[/a] is the link to the FS02 SDK's.I'll post the code in a seperate post.CheersDavid

Share this post


Link to post
Share on other sites
Guest wee_davie_2612

Don't worry about the image bmp's all being the same, I just used some previously made bmp's as a test. Also as you can see they are very simple gauges all in the same format that I've used sucessfully before.(A:COM RECIEVE ALL,bool)(A:COM1 TRANSMIT,bool)Com 1 Switch(A:COM2 TRANSMIT,bool)Com 2 SwitchCheersDavid

Share this post


Link to post
Share on other sites
Guest Karl R Pettersen

Well, I haven't used Click Event= style in ages, so I don't remember the correct syntax anymore. I usually do the code way, since I'm usually doing other stuff in there as well (click sounds etc).I'm only suggesting/correcting one of the errors, you'll have to figure out the rest of them yourself, since they are similar. Try this code for the click spot: 0 (>K:COM2_TRANSMIT_SELECT)It should (not possible to test at this stage) work fine in FS2004, but in FS2002 this events belong to those missing and not working ones.Hope this helps.

Share this post


Link to post
Share on other sites
Guest wee_davie_2612

Hey Karl,Sorry, it didn't work. I tried some variations of it but nothing happened it was just the same as it was. Here is the new code for COM2 (just to make sure I put it in correctly):(A:COM2 TRANSMIT,bool)Com 2 Switch0 (>;K:COM2_TRANSMIT_SELECT)Can you think of anything else that might be wrong? I'm a total newbie at this so I'm not too good at it. I've only ever made two other switches in XML that were for the LAGO F16 (a GPS click spot and a custom MFD on/off switch)CheersDavid

Share this post


Link to post
Share on other sites

Hi,This code works for me in 2004(!).......(A:COM2 TRANSMIT,bool).......Comm 2(>K:COM2_TRANSMIT_SELECT)Hope it helps,Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest wee_davie_2612

Thank you very much Jan,I found the problem in the code, by checking it against yours, for the COM1 and COM2 switches, I added an extra ';' by mistake. They now work perfectly.However the RECIEVE ALL button still does not work.Any ideas for this one? This is the code I've got now:(A:COM RECIEVE ALL,bool)0 (>K:COM_RECIEVE_ALL)I think the action name might be wrong in this line:0 (>K:COM_RECIEVE_ALL)Any ideas?CheersDavid

Share this post


Link to post
Share on other sites
Guest wee_davie_2612

Hey Jan,Thank you very much! That line worked out great. I also noticed that I'd been spelling receive incorrectly and once I'd corrected it in the code the whole gauge didn't work.I checked the panel SDK to double check the spelling and it was indeed wrong. For the switch to react to key commands the line:(A:COM RECIEVE ALL,bool)...must have receive spelt incorrectly (the same as listed in the SDK).But for the mouse click to activate the switch the line you posted must have receive spelt correctly.How very strange!!Again thank you very much for the help, also my thanks to Karl for the help.CheersDavid

Share this post


Link to post
Share on other sites
Guest wee_davie_2612

Hey all,I have one more question. How do you add a sound to the gauge? CheersDavid

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