PDA

View Full Version : Randomizing locations



♣_Spiritus_♣
Sep-14-2014, 13:16
For you script gurus out there...

I'm wondering how you would go about randomizing locations of certain targets so every time the mission loads, certain targets will be in different locations. The only thing I could think of is making the same exact target but make them in different sub-missions then just adjusting where the location is per each sub-mission, then having a randomizing script to launch one of the lets say 10 sub-missions/locations once a plane crosses into the "general area" I give in the briefing.

The mission I am working on has one target for each side that I think would benefit if this is possible. For reds they have to land and rescue a downed high ranking official and return to base unharmed, for blue they have to find a defecting general with stolen battle plans escaping in car going towards the frontline. For both in the briefings I will give general locations of each which got me thinking about if its possible to randomize these so every time the mission starts those objectives would show up in a different area (within certain circumference rather than anywhere on the map).

Possible? Too many variables? I guess I should worry about getting some of the other scripts actually working before thinking of bigger things but figured I'd throw this out there.

Salmo
Sep-15-2014, 01:21
For you script gurus out there...

I'm wondering how you would go about randomizing locations of certain targets so every time the mission loads, certain targets will be in different locations. The only thing I could think of is making the same exact target but make them in different sub-missions then just adjusting where the location is per each sub-mission, then having a randomizing script to launch one of the lets say 10 sub-missions/locations once a plane crosses into the "general area" I give in the briefing.

The mission I am working on has one target for each side that I think would benefit if this is possible. For reds they have to land and rescue a downed high ranking official and return to base unharmed, for blue they have to find a defecting general with stolen battle plans escaping in car going towards the frontline. For both in the briefings I will give general locations of each which got me thinking about if its possible to randomize these so every time the mission starts those objectives would show up in a different area (within certain circumference rather than anywhere on the map).

Possible? Too many variables? I guess I should worry about getting some of the other scripts actually working before thinking of bigger things but figured I'd throw this out there.

Your method of creating seperate submissions with the "target" in different locations, then randomly launching a sub-mission is the easiest methodology to achieve what you're after.