Heretic
Resource contributor
- Messages
- 6,830
- Country

I'm making use of the first variation of the random number generator listed in the wiki.
(Link: http://www.fsdeveloper.com/wiki/index.php?title=XML:_Random_Number_Generators)
I currently call the macro whenever I need a random number generated. This happens on 15 occasions so far when the aircraft is initially loaded. During runtime, seven items constantly require a random number. I think that this causes a performance hit because of all the instancing of the RNG taking place in the gauge. Any way I can make this a bit more efficient?
Currently, each instance looks something like this:
Any way to streamline this a bit?
(Link: http://www.fsdeveloper.com/wiki/index.php?title=XML:_Random_Number_Generators)
I currently call the macro whenever I need a random number generated. This happens on 15 occasions so far when the aircraft is initially loaded. During runtime, seven items constantly require a random number. I think that this causes a performance hit because of all the instancing of the RNG taking place in the gauge. Any way I can make this a bit more efficient?
Currently, each instance looks something like this:
Code:
0.99 1.01 (L:MIT Random Wear E1,number) rng !
if{ @XMLRandom 0.5 + (>L:MIT Random Wear E1,number) }
0.99 1.01 (L:MIT Random Wear E2,number) rng !
if{ @XMLRandom 0.5 + (>L:MIT Random Wear E2,number) }
Any way to streamline this a bit?