sgtpancake Posted July 7, 2018 Share Posted July 7, 2018 Hej I´m trying to build an arena with 20 different missions to take on. One of the missions shall be presented randomly once you press the radio item "Gimme something to do!". Current setup is like this (Trigger/Condition/Action): * Mission Start, none, add radio item flag 1 value 1 * Switched, flag 1 is true, random flag 2 value min 1 max 20 * Once, flag 2 value 1, present mission 1 * Once, flag 2 value 2, present mission 2¨ * Once, flag 2 value 3, present mission 3 .....and so on and on. It works one time, giving me a random mission. But if I press the radio item again, it won´t give me anything. So I tried something else, since I figured the radio item is dead once pressed. * Mission start, none, flag 1000 * Switched, flag 1000 is true, add radio item flag 1 value 1 * Switched, flag 1 is true, random flag 2 value min 1 max 20 * Once, flag 2 value 1, present mission 1 ......and so on. Didn´t work either. Any ideas to get this to work? Link to comment Share on other sites More sharing options...
feefifofum Posted July 7, 2018 Share Posted July 7, 2018 Make sure you turn the radio flag back off as part of the trigger after you complete the mission; otherwise the value is never reset so the flag is always true and only "switches" to true once, the first time you activate it. THE GEORGIAN WAR - OFFICIAL F-15C DLC Link to comment Share on other sites More sharing options...
sgtpancake Posted July 7, 2018 Author Share Posted July 7, 2018 Not sure if I understood you correctly: * Mission Start, none, add radio item flag 1 value 1 * Switched, flag 1 is true, random flag 2 value min 1 max 20 * Once, flag 2 value 1, present mission 1, flag 1 off * Once, flag 2 value 2, present mission 2, flag 1 off That setup did not work. The flag didn´t want to re-trigger Should I change the Mission Start to something else? Link to comment Share on other sites More sharing options...
feefifofum Posted July 7, 2018 Share Posted July 7, 2018 (edited) Nope, you should be able to add the trigger at any time and that looks correct logically. Is it possible you triggered the same mission twice? You'll also need to build a condition that checks if a mission has already been completed and if so, re-rolls your flag 2 value. So - *Once (or mission start), no condition, add radio item flag 1 value 1 *switched, flag 1 true, random flag 2 *once, flag 2 value 1, present mission 1, flag 101 on, flag 1 off *switched, flag 2 value 1 + flag 101 true, flag off 2 + random flag 2 (this checks if mission 1 has already been presented, then resets and re-rolls the flag 2 value. It is necessary to reset the flag 2 value because it won't "switch" to 1 if value 1 is selected twice consecutively) etc. This should prevent repetition and "dud" triggers. Edited July 7, 2018 by feefifofum THE GEORGIAN WAR - OFFICIAL F-15C DLC Link to comment Share on other sites More sharing options...
sgtpancake Posted July 7, 2018 Author Share Posted July 7, 2018 Thank you sir! Now i understand the issue. I couldnt wrap my head around removing flag values because that means i need to remove them from the randomizer too. For now I solved it with a "clear flag" button instead. * MISSION START / no condition / add radio item "Mission" (flag 1), add radio item "Clear" (flag 3) * SWITCHED / flag 1 true / set flag 2 value 1-20 * SWITCHED / flag 2 true / flag 3 off * SWITCHED / flag 3 true / flag 1 off, flag 2 value 0 * ONCE / flag 2 value 1 / Run Mission 1 * ONCE / flag 2 value 2 / Run Mission 2 Now before i press "Misson" I have to clear the values with pressing "Clear". So even if I get value 1 two times in a row, I will be a ble to re-run the randomizer and hopefully get another value.Random_Mission_Test.miz Link to comment Share on other sites More sharing options...
feefifofum Posted July 7, 2018 Share Posted July 7, 2018 That will work, but if you use a flag to indicate whether a mission has already been activated as in the example above you can set it up to all work automatically off of the single radio item. If you'd like I can write out a quick example in-game. Also, just FYI, flag off is the same as a value of 0. Flags can be either a boolean variable, where 0 is "false" or "off" and any number greater than zero is "true" or "on" , or can be measured as a numeric value like you're doing with flag 2. THE GEORGIAN WAR - OFFICIAL F-15C DLC Link to comment Share on other sites More sharing options...
sgtpancake Posted July 7, 2018 Author Share Posted July 7, 2018 Yeah I was just putting my kid to bed and had a thought of what you wrote. I think I understand now and will have a second try. Thanks! Link to comment Share on other sites More sharing options...
BlacleyCole Posted July 8, 2018 Share Posted July 8, 2018 If you post your miz file someone might be able to see the problem BlackeyCole 20years usaf XP-11. Dcs 2.5OB Acer predator laptop/ i7 7720, 2.4ghz, 32 gb ddr4 ram, 500gb ssd,1tb hdd,nvidia 1080 8gb vram New FlightSim Blog at https://blackeysblog.wordpress.com. Go visit it and leave me feedback and or comments so I can make it better. A new post every Friday. Link to comment Share on other sites More sharing options...
sgtpancake Posted July 23, 2018 Author Share Posted July 23, 2018 If you post your miz file someone might be able to see the problem I did. 2 posts above yours :) Link to comment Share on other sites More sharing options...
Recommended Posts