- Messages
- 54
- Country
Greetings,
I've modded an aircraft to be AI stationary version and works fine. But now I would like the aircraft sometimes spawns with the main door open, and sometimes closed, randomly. The animation that control it in the original version aircraft is:
I discovered that if I write <ANIM_CODE>1</ANIM_CODE> the aircraft spawns with the door open, and <ANIM_CODE>0</ANIM_CODE> closed.
How can we generate the 0 or the 1 randomly?
I've tried the RPN random mentioned in SDK but I think I don't use it properly. It's a bit confusing for me and didn't find examples how to use it in this case https://docs.flightsimulator.com/html/Additional_Information/Reverse_Polish_Notation.htm?rhhlterm="rand rand"
Thanks in advance
I've modded an aircraft to be AI stationary version and works fine. But now I would like the aircraft sometimes spawns with the main door open, and sometimes closed, randomly. The animation that control it in the original version aircraft is:
XML:
<UseTemplate Name="ASOBO_GT_Anim_Code" Node="MAIN_DOOR">
<ANIM_NAME>MAIN_DOOR_ANIM</ANIM_NAME>
<ANIM_LENGTH>1</ANIM_LENGTH>
<ANIM_CODE>(L:MAIN_DOOR_POS, number) 100 /</ANIM_CODE>
</UseTemplate>
I discovered that if I write <ANIM_CODE>1</ANIM_CODE> the aircraft spawns with the door open, and <ANIM_CODE>0</ANIM_CODE> closed.
How can we generate the 0 or the 1 randomly?
I've tried the RPN random mentioned in SDK but I think I don't use it properly. It's a bit confusing for me and didn't find examples how to use it in this case https://docs.flightsimulator.com/html/Additional_Information/Reverse_Polish_Notation.htm?rhhlterm="rand rand"
Thanks in advance
Last edited: