Jump to content

How to have a group appear in one of a number of random places?


BritTorrent

Recommended Posts

Hi all,

 

I'm wanting to setup a mission where the player is searching for an enemy artillery unit over a wide area, and I want it to be randomised so they're not always in the same place.

 

Is there a way to set this up using triggers? I haven't really delved into the scripting engine yet because I'm not really clued up on lua, but I'm used to using triggers to setup fairly complex scenarios. I was thinking of maybe creating multiple groups in different locations, and then some sort of trigger to make sure only one of them appears, but I can't see a simple way to do that.

 

Failing that, is this something that's possible with one of the big scripting expansions like MIST or MOOSE? If needs be I'm willing to look into those and see how to set them up.

 

Cheers,

 

BritTorrent

 

Sent from my ONEPLUS A3003 using Tapatalk


Edited by BritTorrent
Link to comment
Share on other sites

There are a handful of ways to do this. If you want to brute force it, place an identical group in as many locations as desired. Check the "late activation" box for each group.

 

Use the SET FLAG RANDOM VALUE action with no conditions to set a flag to a value between 1 and X where X is the number of groups you have placed.

 

Use a second set of triggers to spawn the group based on that flag's value.

 

1 ONCE (Spawn, NO EVENT)

==

FLAG EQUALS (1, 1)

==

GROUP ACTIVATE (random 1)

 

Repeat that for as many groups as you have. When the mission starts, a value will be assigned to that flag. That random value will determine which of your groups will spawn.

Link to comment
Share on other sites

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

  • Recently Browsing   0 members

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