2circle Posted September 30, 2024 Posted September 30, 2024 OK, so I've watched videos on You Tube and scoured the forums but I still cannot figure out what I'm doing wrong. I'm trying to generate some randomness is a mission I'm designing and I basically am trying to flip a coin 5 times at the start of the mission in order to generate 5 random values (1 or 2) in order to spawn groups. For this I have a MISSION START trigger set to run 5s into the mission as below. FLAG 1 is used to spawn 1 of 2 possible groups (TU95 responsive or TU95 UNRESPONSIVE). Those triggers are shown here (as you can see I even included a message to be shown in case I made a mistake with the spawn so that I would know what the value of the flag is) Not only don't either of these groups spawn, but I don't even get the message indicating what the flag value is. Below is a screenshot of the FLAG 1 is 2 trigger. I feel like I'm following all the steps I see in the videos (which seem quite straightforward), but for some reason, I get a very different result. Any help would be appreciated! F-18C/F-14/P-51/F-86 Pico4/Quest2 VR with Intel Core i9 3.0GHZ 24 -Core, 16GB, GeForce RTX 4070 ti
Hoirtel Posted September 30, 2024 Posted September 30, 2024 I've never liked the "mission start" trigger. Try changing this to once with the same condition, it should run after 5 sec if that is what you are after. 1
Wroblowaty Posted September 30, 2024 Posted September 30, 2024 Mission start trigger works as in the name "at the start of a mission" and is checked only once. If you set a condition, that "time is more" than at the mission start (time 0:00) it will check the condition, see it is FALSE (time is not more than 0:05) and basing on false condition will not execute actions. As this trigger is checked only once at the start of the mission, it will not check again for conditions later on. If you want it to work, do as Hoirtel said: make it a "Once" trigger type. This type of trigger will be checked regularly untill condition is met (time is more...) and after that it will execute defined actions and be removed from the list. 1
DD_Friar Posted September 30, 2024 Posted September 30, 2024 @2circle, Salute May I suggest you check out the DML Toolbox by @cfrag. He has put together a utility that will enable you to do all sorts of fancy things via scripts, without you having to know the slightest thing about scripts (like me). It takes the forms of modules that you enable at the start of the mission and then control them via a zone in the mission with parameters. As simple as that. One of the modules is a random flag picker (RNDFlag). You trigger the RNDFlag module (in your example at mission start, you can define it to pick from a number of named flags e.g. action1,action2,action3,action4,action5. You then tell the module how many of those flags you want to pick from and also if you want to remove them from the list. When all of the options have been picked you can also re-set the list back again. In one of my missions I use this to place SAM sites. I have placed about 30 different sites made up of different units, SA8's SA11's, etc. At mission start I run the random module to select 15 from those 30 and activate them on the map, so each time we play the mission on the server players do not know which ones will be active today. I also use it in a mission for when players fly into a zone I pick from 5 random airfields then at the selected airfield I pick from a number of random flights, so again my players do not know what they will be facing or from where. Its really easy to build. Using this Toolbox has changed the way I build my missions now and can not recommend it highly enough. Cfrag is excellent at responding to issues and questions and there is now also a growing number of regular users who will also chip in to help with any questions you may have. This is NOT a mod and you can use it in your mission for multiplayer without other players having to install anything their end. You also do not have to install anything on the server / your machine for it to run. Visit the Dangerdogz at www.dangerdogz.com. We are a group based on having fun (no command structure, no expectations of attendance, no formal skills required, that is not to say we can not get serious for special events, of which we have many). We play DCS and IL2 GBS. We have two groups one based in North America / Canada and one UK / Europe. Come check us out.
104th_Money Posted September 30, 2024 Posted September 30, 2024 (edited) @DD_Friar I have been reading up on DML to incorporate it into my missions but if he isnt familiar with using it already it will probably be more complicated for him that just using ME triggers. I spent about 3 hours reading up on the DML docs and I am barely only grasping it.. @2circle To spawn random units in my server missions, I just do trigger mission start, condition random and pick an percentage and then the action group activate. If I want a chance for it to spawn again later if it didn't spawn on mission start, I run a second trigger once, condition random with percentage and add a condition time more then action group activate. In your case that you want to spawn one or the other, for the first group, trigger mission start, condition random with percentage, action group activate (random activation of first group). Next trigger once, condition time more 10, condition if 1st group dead, action 2nd group activate.(If the first group didn't spawn then it will activate second group). That way one group or the other will always spawn based on the random event in first trigger and you dont have to worry about the first group getting killed and spawning the second group because the condition time more is already passed. Edited September 30, 2024 by 104th_Money Intel i9-13900k, Asus Z790-E Gaming Wi-fi 2 motherboard, 64gb Corsair Vengeance LPX DDR5-6400 RGB ram 2x32gb XMP2 profile, 4TB Crucial T700 PCIE 5.0 SSD internal, 2TB Crucial T700 PCIE 5.0 SSD internal, Asus ROG Strix OC GeForce RTX 4090, Corsair 7000X Case with 5 x 120mm side mounted intake fans and 3 x 140mm top mounted exhaust fans, 1 x 140mm rear mounted exhaust fans, front mounted Corsair H150i Elite Capellix 360mm liquid cooler w/Elite LCD with 6 x 120mm fans in 3 push, 3 pull intake configuration, 1 x 32" Samsung 3840x2160 display, 1x 32" Asus 2560x1440 display, TrackIR5 w/pro clip, Thrustmaster Warthog stick and throttle, CH Fighterstick Pro and Pebble Beach Velocity pedals.
DD_Friar Posted September 30, 2024 Posted September 30, 2024 I will try today and post back here a simple mission to show how it can be achieved but feel (I am biased) the journey to understand DML is not that complicated and well worth it. Visit the Dangerdogz at www.dangerdogz.com. We are a group based on having fun (no command structure, no expectations of attendance, no formal skills required, that is not to say we can not get serious for special events, of which we have many). We play DCS and IL2 GBS. We have two groups one based in North America / Canada and one UK / Europe. Come check us out.
2circle Posted September 30, 2024 Author Posted September 30, 2024 Thank you all. It does appear that making it ONCE vice START trigger resolves the issue. I appreciate the help very much (and I will check out the DML toolbox when I have some time)! F-18C/F-14/P-51/F-86 Pico4/Quest2 VR with Intel Core i9 3.0GHZ 24 -Core, 16GB, GeForce RTX 4070 ti
DD_Friar Posted September 30, 2024 Posted September 30, 2024 I have attached a very simple example that uses the random function. This could be extended in many many ways. DML Example.miz Visit the Dangerdogz at www.dangerdogz.com. We are a group based on having fun (no command structure, no expectations of attendance, no formal skills required, that is not to say we can not get serious for special events, of which we have many). We play DCS and IL2 GBS. We have two groups one based in North America / Canada and one UK / Europe. Come check us out.
Wrecking Crew Posted October 6, 2024 Posted October 6, 2024 Just use Mission Start without any Conditions. You want a flag set to its random value immediately, with a Mission Start event, and before the flag is checked for its value in the following Once event. You could add a Time More condition to the Once event, like 5 seconds. I will separate the Set Random Flag into their own Mission Start events, and not put them all into the same Action on one event,,, but that's me. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Recommended Posts