Jump to content

Random Placement of Units or Waypoints?


Recommended Posts

Posted (edited)

Yes.

 

You can spawn say a Tk Pl in:

 

Location "A" 20% of the time.

Location "B" 40% of the time.

Location "C" 30% of the time.

Location "D" 10% of the time.

 

Or you could have say 20 locations each with a 5% chance, etc.

 

Or just have the unit spawn in one location and a myriad of "jump to end if ..." (each with a probability) commands.

 

Edited by Gibsonm
Link to post
Share on other sites

However, the waypoints where the unit will spawn cannot be entirely random (exception below), just a random pick among (up to 20) defined locations (well, it's possible to concatenate multiple jump routes so technically you could create a very large number of possible locations, but it would be very, very, very impractical.

 

That being said, you can define two (or more) regions and a unit, and then right-click one of the regions and make it a "spawn zone" where you then pick the prototype unit that you want to spawn, and define one or more possible drain zones. This will then make one or more copies of the prototype units appear in a completely random spot inside the region that you designated as a spawn zone (could be a square covering the whole mapped area of your scenario), and then it will travel the shortest route from its random spawn location ot a random location inside the (or one of the) drain zone(s). Once it arrives at its desination it will spawn again and repeate the process, until it (and all its multiples) has/have been destroyed or immobilized.

The intended use are civilian cars and pedestrians walking random paths in your scenario with possible patterns of life behavior. But in principle it can also be used for combatants, be they hostile or friendly. A few caveats will apply; loaded passengers in the prototype unit will be treated as separate entities and thus spawn idependently, so you may see dismounted squads walking by foot, and their personnel carriers driving around empty.

Link to post
Share on other sites
8 minutes ago, TilvaItar said:

Thanks for your tips. I went with the "embark if" option and the third last radio button there (random number).

 

Without knowing exactly what you did, using "embark if ..." means the unit will always start from the same location, but will take different routes to somewhere else.

 

That doesn't quite achieve what you asked for (at least in terms of the post topic) in terms of "placing units randomly", in that the unit will be placed in the same location but will then move to random locations.

 

As long as it achieves the outcome you wanted.

 

Edited by Gibsonm
Link to post
Share on other sites

You need to add a "Jump, if" ("Springe, falls") condition to the routes. That way, when they spawn, they will spawn at the waypoint at the end of the jump route (if the jump condition is fulfilled). If the spawn and jump conditions are purely based on random variables, the units will have spawned already during the Planning Phase. Otherwise they will spawn during the mission, depending on the conditions.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...