TilvaItar Posted May 1, 2021 Share Posted May 1, 2021 Can I place opposing units randomly in the Scenario Editor or at least give them random waypoints (like in Arma 3)? 0 Quote Link to comment Share on other sites More sharing options...
Gibsonm Posted May 1, 2021 Share Posted May 1, 2021 (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 May 1, 2021 by Gibsonm 0 Quote Link to comment Share on other sites More sharing options...
Members Ssnake Posted May 2, 2021 Members Share Posted May 2, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
TilvaItar Posted May 4, 2021 Author Share Posted May 4, 2021 (edited) Thanks for your tips. I went with the "embark if" (see below) option and the third last radio button there (random number). Edited May 4, 2021 by TilvaItar 0 Quote Link to comment Share on other sites More sharing options...
Gibsonm Posted May 4, 2021 Share Posted May 4, 2021 (edited) 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 May 4, 2021 by Gibsonm 0 Quote Link to comment Share on other sites More sharing options...
TilvaItar Posted May 4, 2021 Author Share Posted May 4, 2021 I run the game in German and I messed up the translation. It's "spawn if" with the random variable, not "embark if". I put serveral identical units all over the map and gave them random chances of being spawned. 0 Quote Link to comment Share on other sites More sharing options...
Members Ssnake Posted May 4, 2021 Members Share Posted May 4, 2021 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. 0 Quote Link to comment Share on other sites More sharing options...
RedWardancer Posted May 16, 2021 Share Posted May 16, 2021 Would someone please give a short, detailed video example of spawn zones? 0 Quote Link to comment Share on other sites More sharing options...
Members Ssnake Posted May 16, 2021 Members Share Posted May 16, 2021 I don't have one ready yet. But the concept is not very difficult to describe. Create two regions, the future "source" and the "drain". Create one unit. Right-click the source region, go to Options, Spawn Zone, Set Prototype. Pick the unit you created. Define how many copies of it should be assigned to this spawn zone (say, 5). Set the spawn rate (say, one per 30 seconds). You can chose to have the unit's copies to spawn at exactly every 30 seconds, or in a more randomized fashion (but still, on average, every 30 seconds). Define the Drain zone (the other region). Define the spawn condition. If you leave it empty, it will start spawning 30 seconds after mission start, and will end with the end of the mission. Copies of the prototype units will then appear every 30 seconds, until the pool of copies has been depleted. The units will appear in a random location inside the spawn zone. They will then autonomously travel to a random spot inside the drain zone, and once that they have reached it, disappear/return to the clone pool. That's largely it. Points of consideration: Copies of the unit that die while in transit to the drain location will be (permanently) removed from the actor pool. Kill them all, and they will stop coming. When all copies have been spawned, no more will come until the first unit has reached its drain point, and be returned to the actor pool. A region can be both source and drain. In that case units will appear in a random spot and move to a random spot intin the same region. You can set units to travel off-road, in which case they will take the shortest route. Or you set them to travel on roads, in which case they will use the fastest route on roads that involves minimal amount of off-road travel If your prototype is a vehicle carrying troops (including unarmed grannies), troops and vehicles are considered separate prototype units, and spawn independently Spawn and drain points within the region are randomly selected, with a uniform distribution. If you make the regions very small, the spawn/drain location becomes very predictable (obviously). If you have exactly one drain zone for your spawn region, both are small, you have many copies of your prototype, and the spawn rate is high, the result will look like a trail of ants. The opposite end of the spectrum are rare, random interlopers that may appear when you don't expect them. Time-based switches of spawn zones allow you to create patterns of life, such as rush hour in the morning with cars from multiple suburb and peripheral village zones all driving towards the big city. In the evening the city could produce lots and lots of cars streaming to the suburbs. 0 Quote Link to comment Share on other sites More sharing options...
RedWardancer Posted May 16, 2021 Share Posted May 16, 2021 So once the spawned units reach a location, they disappear. Is there a way to make them stay at such locations besides death? Or do I have to do this the hard, long, drawn out process by giving each unit the "Embark if" and and "Jump to end if" routine? This isn't so bad at platoon and company level engagements. But at battalion/regiment...😒 0 Quote Link to comment Share on other sites More sharing options...
Members Ssnake Posted May 16, 2021 Members Share Posted May 16, 2021 9 minutes ago, RedWardancer said: So once the spawned units reach a location, they disappear. Is there a way to make them stay at such locations besides death? No. The intended purpose of the function is to create traffic from civilian pedestrians and cars. It also works for military units, but it's hard to imagine an application case that could be considered tactically sound and realistic. 9 minutes ago, RedWardancer said: Or do I have to do this the hard, long, drawn out process by giving each unit the "Embark if" and and "Jump to end if" routine? I'm afraid so. But! You can copy such a route chain, once defined, and then paste it to the rest of your regiment: 0 Quote Link to comment Share on other sites More sharing options...
RedWardancer Posted May 17, 2021 Share Posted May 17, 2021 AHA!!!! I have SB scenario work to be done. 🤘 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.