Randomize player starting locations

Solu9

You can change this now in User CP.
Reaction score
216
Yes yes yes I know the basics about start locations. The reason for this question is that I have 9 castles with pre-placed walls, Guard Towers, Town Halls and worker units. As default all castles is owned by a neutral player and all castles is covered by a region fx. "Base 01".

Now I have up to 4 players in the map and I want to randomize which castle (including all units within) they start at, at the beginning of the game.

I would think it's not that hard but I can't seem to find a good way to do it. Any ideas?
 

denmax

You can change this now in User CP.
Reaction score
155
There's no real way to place starting locations using triggers. You'd have to force the camera to pan to said random location for the player. Unless this isn't what you mean.

If the problem's more complex (as in, you don't know how to do the randomized castle thing in the first place), here's some ideas
You can use RNG via "Math - Random Number" condition.
You can use pre-placed regions around every castle. It makes picking every unit to change ownership a whole lot easier.
You can use a Region Variable with an Array so we can set them like an integer. This way, we can randomize it using said RNG.
After picking everything etc, remove the used region from the array and move up previous entries higher. Reduce the RNG limit by 1.

It's a ton hard to explain, but the best I could assist with you is to give you the allrandom trigger tutorial

http://world-editor-tutorials.thehelper.net/herotavern.php#triggers
You can get a basic grasp of what' I'm talking about using them. Basically replace the Heroes with Regions, and change the actions in a way that it changes the ownership of all units within the region.
 

denmax

You can change this now in User CP.
Reaction score
155
Sorry.. 5 years back I used to post a whole lot of things when people ask help... just to be safe ya know?
 

Solu9

You can change this now in User CP.
Reaction score
216
Sorry.. 5 years back I used to post a whole lot of things when people ask help... just to be safe ya know?


Oh and just FYI. That link I saw you read helped out, and now it works :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top