• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.

millenius

M

millenius

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!
 
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.
 
But I think he means those tiles which buildings like the 'Town Hall' come with surrounded around them everytime you try to build...
 
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 by a moderator:
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.
Back
Top