Walkable region?

ablationer

New Member
Reaction score
0
The problem I have is that when I'm creating an unit, sometimes it spawns stuck on a wall, or even in water if there is, and I obviously don't want that to happen, I tought maybe I could make specific regions that I know are free from wall contact or water, but the problem is that I have a very harsh terrain with lot of small holes and terrain change everywhere, I'd need to create hundreds of small regions, and I don't want that either...

So the question is : When I create units, is there a way to make my region only appliable on walkable areas? or at least something that would make my units not spawning on walls or in water?

Thanks
 

freakincage

New Member
Reaction score
1
Are your units being spawned like this? :
Code:
Units
    Events
    Conditions
    Actions
        Unit - Create 1 No unit-type for (Picked player) at (Random point in (Playable map area)) facing Default building facing degrees
Are your units being spawned in Random point in Playable map area? Because if so, there will be chances that the units will be spawned in those small hole areas, especially if your unit collision size is small enough to fit them inside those spaces. What I would do is simply make one region and just make it so you spawn your units only in that region...Does that sound good?

If not, describe your problem alittle more.
How are your units being spawned in water? Is it shallow water? If so then yeh, but I don't see how your units can be spawned in deep water 0.o
 

ablationer

New Member
Reaction score
0
Yes they are spawned like this, they are spawned in Random point of my region I placed earlier, but it is very large, and inside that region there are a lot of holes and thin walls. The thing is that I want them to spawn randomly over a very large area, because I'm spawning creeps and I want it to look the most "natural" possible, as in they won't always spawn in the same place, but over the whole field at random places,

and yes, they do spawn in deep water, they're not floaters of amphibious, so I don't get it ...
 

freakincage

New Member
Reaction score
1
As for the small holes, you can change the unit/creep collision size to a higher number so that they arn't spawned in the small areas, or you can simply cover those small holes with either more natural enviroment stuff or with path blockers...
Path blockers I think would work fine, however if your map is large and there are a lot of small holes, it could take you a while to fill those holes.
 

ShadowTek

New Member
Reaction score
23
Maybe you could fill your map with regions that enclose the "safe areas" that your units can spawn in. Then, assign each region to an array position of a point variable.

After that, all you have to do is spawn a unit at a random point in your point region variable. The array number would also be randomly selected.

In this way, your unit would appear at a random point within a random, safe-area region.
 

Romek

Super Moderator
Reaction score
963
Code:
(Terrain pathing at TmpPnt of type Walkability is off) Equal to True

Its a condition, Boolean.

Make TmpPnt the random point in region, then check the condition.

:D
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
You can make regions at the places where the units get stuck then do a trigger so if a unit enteres that region it will be moved to a random point in the main region.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top