• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] I want my map's all walkable area to be buildable

Status
Not open for further replies.
Level 6
Joined
May 29, 2013
Messages
139
Only trigger. No other way(like UMSWE)
How can I do this?

JASS:
function Trig_Geo_Initialization_Actions takes nothing returns nothing
 local real x_start
 local real y_start
 local real x
 local real y
 local real x_end
 local real y_end
 local rect aodt = GetPlayableMapRect()
  set y_end = GetRectMaxY(aodt)
  set x_end = GetRectMaxX(aodt)
  set y_start = GetRectMinY(aodt)
  set x_start = GetRectMinX(aodt)
  set x = x_start
  set y = y_start
  loop
  exitwhen x > x_end
  loop
  exitwhen y > y_end
  if ( IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY) == true ) then
  call SetTerrainPathable(x, y, PATHING_TYPE_BUILDABILITY, true )
  endif
  set y = y + 32
  endloop
  set x = x + 32
  set y = y_start
  endloop
 set aodt = null
endfunction

I used this. but it doesn't work.
Please help me.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
So what are you wanting this trigger to do exactly?

As far as I know "buildable-ness" has to do with the building, or you can use tiles as a general convention.

The standard is that buildings are able to be built on buildable terrain which is decided by the tiles. i.e. grass is buildable so buildings can be built on grass.

Under your unit in the OE there is "Placement Requires". You're going to want to check the fields that you to be buildable.

Although I feel like what you are trying to do in this trigger is move the building until it find a spot that is buildable and put it there, but you're missing a lot of the trigger if that is the case.
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
Why don't you want to use something like UMSWE?

JNGP has an option to make each tile have a custom pathability. It is super useful, for example I use it make rocky tiles unwalkable and use them to make custom cliffs. It saves me from using thousands of pathing blockers.
 
Status
Not open for further replies.
Top