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

Building Units facing angle of constructing unit.

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2007
Messages
338
If this question is in the wrong place please move it.

The default rotation or facing angle of a building unit is 270 degrees.

I would like to make it to where a player can choose the rotation or facing angle of a unit.

For instance the barracks door faces 225 degrees (South west) Perhaps the players wants it to face due south, or east.

Is there a way to do this without making 8 compass directions facing units for each unit?

Thanks
 
Level 8
Joined
Feb 20, 2007
Messages
338
It matters on how you want the player to choose, like you could always make it so that he can select the unit and type "rotate: <angle>" or something, which would be the simplest way.

Hm. So once the unit is constructed the player could have the option of turning the building?

Sounds interesting. I'll have to play around with this idea.
 
Level 8
Joined
Feb 20, 2007
Messages
338
why dont use unit? not building

"unit" is a word that applies to a lot of things, be it a footman, a peon or the town hall.

If I said "how do I turn a unit" people would come back with, just order him to move - duh!"

So in my first post of this thread I clarified:
The default rotation or facing angle of a building unit is 270 degrees.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
I can see 2 options here:

1) Export the Barracks model, and edit it with a model editor. All you should od is turn the model 45°, 90°, etc.
Then you import it again and you have different barracksmodels again.

2) Trigger it. Make it so that whenever a unit finishes constructing a Barracks, remove the Barracks and create a new Barracks unit at position of the old barracks facing 90°, 45°, depending on "what" barracks you made.
 
Level 8
Joined
Feb 20, 2007
Messages
338
Good ideas, however I have really tried to keep the size of the campaign (data size) down and this strikes me as going to require to many extra models, considering all of the building type units available.
 
Object Editor:
1) Set the Movement - Speed Base to 1 or something higher than 0.
2) Set the Movement - Turn Rate to 1 or something higher than 0.
Trigger Editor:
3) Set the angle you want it to have with Unit - Make Unit Face X
4) Remove the ability to move:
  • Custom script: call UnitRemoveAbility(udg_YourUnit, 'Amov')
From then on you can use Unit - Make Unit Face X freely.
 
Status
Not open for further replies.
Top