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

Turning a building from start.

Status
Not open for further replies.
Level 9
Joined
Apr 11, 2008
Messages
515
Okay so this is what I'm having trouble with.
In my map I want a barrack to turn the direct opposite way of the normal placement way(It is a building that is starting in the map if that is any help to you or making it possible(Its possible since I have seen it I just don't know why :( ))
I believed it could be done without triggers but maybe that is me(Also tried didn't know how the **** to do it) Thanks for reading and admin(s) if its trigger and when it gets answered please move it to trigger forum thanks.
 
Level 9
Joined
Dec 6, 2007
Messages
233
Yup, triggers, but it's pretty simple:

  • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing Number degrees
Set Number to the degree you need, and don't forgot to kill the position leak.
 
Level 3
Joined
May 27, 2007
Messages
67
Also in Gameplay Constants you can change building facing degrees. Yet this changes all the buildings, which I guess you don't want(?) Just letting you know in case you didn't ;)
 
Level 6
Joined
Mar 22, 2009
Messages
276
According to your question, you want your starting building to face other directions instead of the default facing.
You're right! You can do it without triggers! In object editor>unit> then select your building, then find the "Stats - Is a building" set it to false. Now go to your unit placed in the map, click it, Ctrl + left-click to where you want the building to face. After having your desired angle, set the "Stats - Is a building" back to true.
I already used that method in some of my map and it worked.
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
okay here is how to do it with killing the memory leak. in case, this is still unsolved.
first create a variable called TempLoc and set it to a point, next make a trigger like this. or add the actions to an already created trigger.

[trigger="your trig"]
Face Point
Events
Map Initialization //can be changed to whatever you need
Conditions
Actions
Set Temp_Loc = ((Position of (your unit)) offset by (0.00, 5.00))
Unit - Make (your unit) face TempLoc
Custom Script: call RemoveLocation(udg_TempLoc)
[/trigger]

((Position of (yourunit)) offset by (0.00, 5.00))
^^^^> That will make your unit face North (up)
(0.00, -5.00)) will make it face South (down)
(5.00, 0.00)) will make it face East (right) and
(-5.00, 0.00)) will make it face West (left)

if you need a more specific direction just use a combination of those. or just ask me :thumbs_up: Hope It Helps.
 
Status
Not open for further replies.
Top