il88pp Posted May 9, 2019 Share Posted May 9, 2019 :D Hi, it's been long since I did a gauge. Just had an idea, but don't know where to start searching, (and feeling a bit lazy and sleepy too to be honest) so I thought I'd just ask. I made a gauge a while ago. That gauge works fine. I now want to improve it a little. The gauge is of the type: If condition A is met, show smoke effects on aircraft. And works. The gauge is written in XML I now want to Randomize the effect shown. As in: If condition A is met in 50 % of cases show effect 1 in other 50% of cases, show effect 2 Is there an easy way, in .XML, to do this? thanks! il88pp. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
il88pp Posted May 9, 2019 Author Share Posted May 9, 2019 I'm sure you want to know more about the code I used. I should really look up to make sure. As I said, it's been a while, so looking up may take long. from memory: gauge syntax is similar to: (A:altitude) smaller then 1000 feet AND (L:ABCDE) = 1 if: 1 > (K:SMOKE_ON) AND 2 > (K:SMOKE_ON) AND 0 > (L:ABCDE) or in words: If Altitude smaller then 1000 feet AND (L:ABCDE) was previously set to 1 then switch on smoke 1, smoke 2, and set (L:ABCDE) back to value 0 (zero). ---------------------- I would like to change this in such a way that half the time smoke 1 comes on in that condition, and half the time smoke 2. (or at least some randomisation, does not have to be 50-50. 60-40 is good enoug.;) ----------- (and don't worry too much about the L:ABCDE. It's not the end of the world if this becomes a runaway.) ----------------------------- --------------------------- Sorry for not posting the full code. I tried to combine this gauge with another. And got really stuck. It may take me some time to untangle and find the working simple version again. So for now this is the best I can do. il. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
PAULCRAIG Posted May 13, 2019 Share Posted May 13, 2019 You could try using Doug Dawson's Random Number Gauge, dsd_random_number.zip from the Avsim library. The code would look something like this: (A:Indicated Altitude, feet) 1000 (K:SMOKE_ON) } els{ 2 > (K:SMOKE_ON) } Having not used Doug Dawson's Random Number Gauge myself, I think this code is something you can work with. Link to comment Share on other sites More sharing options...
il88pp Posted May 13, 2019 Author Share Posted May 13, 2019 Thanks. That sounds like a very nifty gauge. I'll look into it. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
il88pp Posted May 15, 2019 Author Share Posted May 15, 2019 dsd_random_number.zip I can not find that file on Avsim.com (Not in Library. Did find link in Avsim forum but clicking gives "file no longer available" message.) I did however find on FlyAwaySimulation.com an aircraft that has the gauge itself in it. - dsd_random_number.gau (I assume that is the file that would be in: "dsd_random_number.zip" as well.) https://flyawaysimulation.com/downloads/files/23788/fsx-mcdonnell-fh-1-phantom-with-updated-panel/ With among it's files: dsd_random_number.gau 07.22.07 51.71 kB dsd_random_number_readme.txt 08.29.08 1.90 kB ( both in folder: ..\fsx_mcdonnell_fh1phantom_updated\FSX_McDonnell FH1Phantom_updated\gauges\AERIT-F104S-ASA-Gauges\ ) (Haven't had time to look at the files yet. -- Just file info posted in case someone else was looking for the gauge as well.) [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
mrzippy Posted May 15, 2019 Share Posted May 15, 2019 Still thinking about a new flightsim only computer! Link to comment Share on other sites More sharing options...
il88pp Posted May 15, 2019 Author Share Posted May 15, 2019 yes, found now, thank you! Had looked direct in Google, normally that finds files in Avsim Library. But now no results. Searching in the Library itself I now found dsd_random_number.zip. Thanks. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
PAULCRAIG Posted May 21, 2019 Share Posted May 21, 2019 Have you managed to get this gauge working? Link to comment Share on other sites More sharing options...
il88pp Posted May 24, 2019 Author Share Posted May 24, 2019 Sorry, haven't looked at it much yet. Weather is too good here the last few weeks.:cool: [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
PAULCRAIG Posted May 24, 2019 Share Posted May 24, 2019 Weather here in the UK has been good also! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.