Stratos Posted April 27, 2014 Posted April 27, 2014 The triggers make my missions more interesting, but I want to take a step forward and start to add random situations on my missions. The problem is that adding random is a thing I can't understand how it works, so hope someone can explain step by step to create the triggers I need to get the situation I want to recreate. - I have 4 ground groups, A, B, C and D. I want a trigger that shoots every time I start the mission and that activates, one and only one of those groups selecting the activated one at random. I will be happy with that If someone can explain how to do it. If is possible to get one of the ramainder groups activated at random once I destroy the first will be simply amazing! Thanks a lot! I don't understand anything in russian except Davai Davai!
Exorcet Posted April 27, 2014 Posted April 27, 2014 Isn't there a trigger to set a random flag value? If so, use that trigger first. Then have a bunch of "if flag = X, activate group Y" I've done this. It's a great addition to missions. You can basically make completely different situations from a single mission file. I'll load up DCS to remember exactly how to set it up. Awaiting: DCS F-15C Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files
mwd2 Posted April 27, 2014 Posted April 27, 2014 Mission Start(Random) // // Flag Set Random Value(1,1,4) Once(F1,1) // Flag Equals(1,1) // Group Activate(A) Once(F1,2) // Flag Equals(1,2) // Group Activate(B) Once(F1,3) // Flag Equals(1,3) // Group Activate© Once(F1,4) // Flag Equals(1,4) // Group Activate(D) in the Group Menu: later activate Playing: DCS World Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof. Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh Ghost0815
Exorcet Posted April 27, 2014 Posted April 27, 2014 Here's a template. Random 1 of 3 groups. If shot down, a second group spawns.Random.miz 1 Awaiting: DCS F-15C Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files
ENO Posted April 27, 2014 Posted April 27, 2014 (edited) I'm going to add this answer over here too since I did answer in SimHQ but this random script from MIST really helped me and guys on this side may find it useful. I'm hoping a mod may move this thread over to the mission builders corner because that would be the better place for it. Another option- adding / supplementing what crew has described above which is probably the easiest way to make it happen- is to use this simple script adopted from MIST functions. It can be found here- http://forums.eagle.ru/showpost.php?p=1991162&postcount=451 The script itself is: do local flagName = "1" local minVal = 1 local maxVal = 4 trigger.action.setUserFlag(flagName, mist.random(minVal, maxVal)) end The only thing you'd need to change to use this instead is that instead of setting the flag value in mission start, you would run "do script file" and load "MIST 3.3" instead. You can get the MIST download here: http://forums.eagle.ru/showpost.php?p=1622305&postcount=3 MIST would be loaded at mission start, and this "do script" trigger would be done on a once / time more (10) / do script. That script as it is above can be copied from this page and then you can use cntrl-v to add it to the "do script" window. Why would you go through the trouble? It comes from a pretty high authority that the scripting engine from DCSW favours first and last values, potentially limiting the actual "randomness" to your missions. It is my understanding that the MIST random functions rely on a more thorough random generator that contributes more to proper randomization. Both methods achieve the same objective... one MIGHT do it a bit more completely- but your experience may differ. With every update they may have fixed their random generator in the shadows... Edited April 29, 2014 by ENO Ctrl-c / Ctrl-v 1 "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Stratos Posted April 29, 2014 Author Posted April 29, 2014 I'm trying some of the solutions, it adds a lot to the Fun factor of the mission. I'm adding now proper radio sounds and it plays even better! Thanks guys! I don't understand anything in russian except Davai Davai!
ENO Posted April 29, 2014 Posted April 29, 2014 Sorry. One correction- I keep typing Ctrl-c for paste and I'm not sure why. It's Ctrl-v for paste. C is copy. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Wrecking Crew Posted May 9, 2014 Posted May 9, 2014 Random flag test using regular events -- http://forums.eagle.ru/showthread.php?t=124319 WC 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.
shagrat Posted May 9, 2014 Posted May 9, 2014 When you mix multiple Random Trigger flags, which control certain unit mix conditions and then throw in some Air defences, surprise enemies with the propability value in the Mission Editor (Unit propability in percentage), you get quite a randomized mix. You can refine that by using different min/max values for flags and even set groups to appear based on value higher or lower than a flag value. I used that for one of my missions and the mix is getting so randomized that you can't really tell what opposition to expect. Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)
Recommended Posts