Restore move to random PLAYABLE position

There was function move to random playable position in modd.io. I don’t know why u deleted it.

Can u restore it?

Nobody likes ores in walls. :confused:

2 Likes

More arguments:

  1. One big region is cool because units can spawn in big area so player needs to find them.
  2. More regions means bigger predictability = less fun.
  3. I can make script to select spawning region from valid regions for each unit but imagine making this script for 30-50 units types and 50-100 regions! I need to make different script for EVERY unit.
  4. I guess that u’ve disabled this function because of problem with finding valid place after 20 attemps. So change algorithm to something like this:
  1. Repeat 5 times
  2. Move unit to random position in region
  3. Check if position is valid.
    3.1 True: finish algorithm
    3.2 False: continue
  4. Set WAITING_TIME to 30 seconds
  5. Repeat until position will be valid
    5.1 Wait for WAITING_TIME
    5.2 Move unit to random position in region
    5.3 Check if position is valid.
    5.3.1 True: finish algorithm
    5.3.2 False: WAITING_TIME = 2 * WAITING_TIME
2 Likes

erh,@m0dE :V -------

1 Like