• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Terrain Pathing?

Status
Not open for further replies.
Level 24
Joined
May 9, 2007
Messages
3,563
I have a spell.

  • Dig
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dig
    • Actions
      • Set TempPoint1 = (Position of (Triggering unit))
      • Environment - Change terrain type at TempPoint1 to Village - Dirt using variation -1 in an area of size 2 and shape Circle
      • Custom script: call RemoveLocation(udg_TempPoint1)
It sets the terrain type under the unit to dirt. Unfortunately it does not set the pathing. I need to find a way to set the pathing of the area to buildable. A screen shot of what the ability does is included.

500th post!!
 
Last edited:
Level 17
Joined
Apr 27, 2008
Messages
2,455
really easy to use

if you can use the jassnewgenpack just copy/paste the library in an empty trigger, or in the custom code window.
If you can't use jasshelper remove the words debug,library,endlibrary and copy/paste the functions in the custom code window

example of use :

JASS:
call SetCircleTerrainPathable(GetLocationX(udg_TempPoint1),GetLocationY(udg_TempPoint1), 128.0,PATHING_TYPE_BUILDABILITY,true)

ofc instead of 128.0 use the size you want

btw you can avoid using a location and use directly GetUnitX() and GetUnitY()
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
JASS:
function SetCircleTerrainPathable takes real xc,real yc,real radius,pathingtype t,boolean b returns boolean

this function change the pathing for a circle, and return true if it was done and false if not, but you can ignore this return.

xc -> it's the x coordinate of the center of the circle
yc -> it's the y coordinate of the center of the circle
radius -> it's the radius of the circle :p
t -> it's the pathingtype, you can found the constants with jasscraft for example or convert in jass a gui function.
b -> true -> turn on the pathing ; false -> turn off the pathing

that's better ?
 
Status
Not open for further replies.
Top