• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Creating buildings on uneven ground via triggers

Status
Not open for further replies.
Level 4
Joined
Jul 11, 2007
Messages
82
I'm using a script to replace buildings on my map, but they don't always spawn in the exact location when I use "CreateUnitAtLoc" because the ground is slightly uneven or something like that. What do I do to allow buildings to be placed on the exact point I specify, regardless of terrain?

I need to keep their pathing maps, but do I change "Pathing - Collision Size" or "Pathing - Placement Requires" ?
 
Level 9
Joined
Nov 4, 2007
Messages
931
Collision size will help, but what do you mean by uneven? Do you mean that there are raised cliffs in the area or that the terrain is simply raised or lowered in a few spots (non cliff)?
 
Level 4
Joined
Jul 11, 2007
Messages
82
There aren't cliffs, but it's just bumpy grounds will small hills and valleys (hardly even noticeable). It's also possible that some are too close to the water.
 
Level 9
Joined
Nov 4, 2007
Messages
931
If the ground is simply bumpy then the building is going where it naturally would, uneven or not, but buildings have a tendency to be placed in grids, so it might look like its not going exactly where you want it, but it is placing itself on the grid as close to the point as you want it to be in.
 
Level 4
Joined
Jul 11, 2007
Messages
82
Ok, I've turned down the collision size to 0. I understand that buildings need to be placed on grids and that's not a problem. Unless anyone has anything else to add, I think I've got it.
 
Status
Not open for further replies.
Top