• 🏆 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!

How do you change the tiles when placing a unit (Building) ?

Status
Not open for further replies.
Level 1
Joined
Jun 4, 2010
Messages
4
As title, I'm still new to WE, and I've gone through bunch of terraining tuts, but none of them explain how to change the tiles when placing a building. I have already experiment with the Object Editor, but I still can't change the tiles. Help!
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
By changing the tiles, do you mean change them to just a patch of ground or to a different set of tiles?
 
Use this trigger:
  • Trigger
  • Events
    • Unit - A unit finishes construction
  • Conditions
  • Actions
    • Custom script: local unit u = GetTriggerUnit()
    • Custom script: local real x = GetUnitX (u)
    • Custom script: local real y = GetUnitY (u)
    • Custom script: call SetTerrainType (x, y, 'Wsng', 1, 3, 1)
    • Custom script: set u = null
For all terrain types, visit this thread:
http://www.thehelper.net/forums/showthread.php?t=125223
(Replace 'Wsng' with the terrain type you want).
1 - 3 - 1 (from the script) are/mean:
1) Tile variation
2) How big the tile will be (mine has an area of "3")
3) 1 is for square, 2 is for circle.
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
But I think he means those tiles which buildings like the 'Town Hall' come with surrounded around them everytime you try to build...
 
Level 1
Joined
Jun 4, 2010
Messages
4
Thanks! Either way is fine. I'd just want to replace those ugly tiles that ruin my terrain :(


EDIT: Sorry, a new question. How do u able to rotate building ? I tried holding ctrl + and left click, it doesn't rotate. But, when I try placing a unit (Peasant), I'm able to rotate it.
 
Last edited:
Level 5
Joined
May 27, 2007
Messages
162
Unfortunately, (as far as I know) all buildings come with a 'Default Facing Angle'. And you can only change this globally (ie. for all of the buildings in your map), by going Advanced > Game Constants.

I might be wrong. There might be a way to rotate single buildings manually. Try searching the forums, I think it has been brought up in the past. Pharaoh_ might know ;)
 
Buildings can have a rotation, but this trick will only happen for preplaced units (which you set them by the Editor, not by triggers, in-game).
Go to your unit in Units tab', scroll to Stats - Is a building and set it to False. Then, go to World Editor and place the unit. Rotate it towards the angle you want and then go back to the unit in the Object editor (Units' tab) and set Stats - Is a building = True.
 
Status
Not open for further replies.
Top