Random Spawn and Cliff Troubles

OogaBooga

New Member
Reaction score
0
Ok so I'm making a single hero map and I want each hero chosen to spawn at a random place on the map. The map itself has very rugged and random outdoor terrain, with a large number of cliffs.

The problem I'm having is that the heroes will frequently spawn on those cliffs and get stuck, unable to move off of them.

I used the Large Pathing Blocker doodad to "seal" the pathing map, so that there aren't any holes where they should be able to spawn, but they are anyway :banghead:

I know it's possible to prevent this, maps such as NOTD do the exact same thing and no units OR items spawn on the cliffs. Anyone know the solution to my problem? Thanks in advance!

---------------------------------------------

New Development: I've discovered that by making a mass item creation trigger, I am unable to cause any of them to spawn on cliffs. However, my hero spawning trigger will cause the hero selected to spawn on the cliffs, and if I restart the map multiple times, it will frequently spawn the hero on the exact same spot. However, if I wait 5-10 seconds after the map loads before I select my hero, it will frequently spawn the hero normally. This is just weird, anyone else ever have a similar experience?
 

eXirrah

New Member
Reaction score
51
You can create regions around the cliffs then

integer variable var_rand = random number (0),(regions count-1)

then you create an array that contains all the regions like
var_reg[0] = reg1,
var_reg[1] = reg2,
....

then you create point variable that should look like that

var_point = random point in (var_reg[var_rand])

and then create unit at (var_point)

This should prevent your hero from spawning where you don't want it and you get more control over the spawning like if you wanna make sure that the next spawned unit don't spawn on top of the previous you just need to create another trigger like


Hero enters region

set var_reg1 = entered region

and then you can put an if that will check if the region of next spawn is not equal to this one and so on ...
 

darkbeer

Beer is Good!
Reaction score
84
Code:
(Terrain cliff level at (Center of (Playable map area))) equal 0

use that condition^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top