Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Just make it dynamic.
Basically each start has certain units and such created for them.
The player for each start is selected randomly.
Both the start and the player is then removed from a list of available starts and it repeats.
If you have to use editor placed units, you can represent each start as a group (by picking all units of the start owner). You then choose a random player and then make all the units in the group to be owned by him and repeat again with both start and player removed. Any remaining players means you messed up game desin and any excess slots are removed (all units removed).
I want to have a player group, then shuffle the unit ownership between the players randomly. So Player 5 will have Player 1s units and Player 3 will have Player 5s units. If you see what I mean I think what Dr.Super Good sounds like the way to do it.
The programing way to do this is to have a list you loop through and then get random items from another list and combine them.
A list of players ingame is easy, this can be a force.
You then loop through the force (enum). For each player you choose one of the available slots (a list of groups which is an array going from 0 to number of groups which you choose the index at random as a random integer between 0 and the number of elements) and then give him all units of that group (an enum). You then remove that group from the list (slot of group = last element and reduce number of elements by 1). The loop repeats until every player has a group of units.
Finally any left over groups you enum through and remove or give to neutral hostile (no player to own them).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.