Jump to content

Recommended Posts

Posted

Hello,
to randomize aspect of the missions, i want to fire a single trigger out of many triggers available. Each trigger would then spawn in different groups etc. but i want to only fire one trigger, not many of them.

 

What would be the easiest way to do this without external scripting?

 

i assume i would have to give a flag a random value from 1 to n and then fire a trigger when it somehow matches the number in the flag.

could anyone help?

 

thanks.

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

Posted

https://wiki.hoggitworld.com/view/DCS_editor_Randomization#Single_Choice_from_List

Single choice from list or Random Integer List are the best choices. 

 

Main advantage of single choice from list is that you can set the flag to false again and it will make another choice from what remains. Downside is that it isn't instant and depending on the random value you set can take several seconds to over a minute to activate. 

 

Likewise random integer list is instant, but activating another choice later can require multiple "dice rolls" as each choice gets eliminated the probability of it randomly getting an unused value decreases. 

  • Thanks 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

In my missions I do this:

 

Mission Start > Flag set random value

 

Once> Flag = 1, time more = 5 > spawn group 1

 

Once > Flag = 2, time more = 5 > spawn group 2

 

etc.

 

This way you can basically have entire different scenarios in the same mission.

  • Thanks 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

 

Posted

@Grimes@Exorcetthanks very much to both of you!

 

why does the random integer list has the timed condition though? the hoggit wiki has the timed condition with the dice roll, exorcet's example has the timed condition with each trigger fire. i don't understand why I'd need a timed condition at all. the trigger will only activate once the dice roll is done, so what's about the 5 seconds?

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

Posted

I use the time condition for additional control over things, for example sometimes I might not want to spawn a group immediately, or I might replace "time more" with "time since flag" to have the event trigger after another event (like a group entering a zone). Additionally I might tie multiple events to the same Flag random value, but have them go off sequentially, spaced by certain times. If you're not doing any of that I suppose you can just delete the time part.

  • Thanks 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

 

Posted

I just wrote the example in a way that would execute immediately. Once>Time Less than 5 basically executes right after you unpause the mission. The conditions don't really matter as long as you set the flag to a random value when you want things to spawn. 

  • Thanks 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...