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

[Trigger] How do i rotate buildings in-game?

Status
Not open for further replies.
Level 2
Joined
Dec 15, 2012
Messages
26
I play a lot of Titan Land, and in there newer versions there's a feature to rotate buildings. I'm trying to create my own version of Titan Land, so i'd like to include that in mine too. I've googled it, but there hasn't been any useful information on it. Please help. :3
 
Here, test the map.

To make it work:
Buildings need the custom ability 'Change facing'
Buildings need more than 0 movement speed base
Buildings need more than 0 turn speed

:)

PS: Remember to edit the spell to your needs if you want to use this way.

This won't really do since any buildings with attacks will turn by themselves
 
Well thats the way you do it with GUI, you can control any facings by triggers either.

Or copy and paste the function (maker posted the link) into your map header and call it.

custom script: call SetImmovableUnitFacing(GetTriggerUnit(), ANGLE)
If you cast an ability you can replace ANGLE with:

Atan2(GetSpellTargetY() - GetUnitY(GetTriggerUnit()), GetSpellTargetX() - GetUnitX(GetTriggerUnit()))
 
Well thats the way you do it with GUI, you can control any facings by triggers either.

Or copy and paste the function (maker posted the link) into your map header and call it.

custom script: call SetImmovableUnitFacing(GetTriggerUnit(), ANGLE)
If you cast an ability you can replace ANGLE with:

Atan2(GetSpellTargetY() - GetUnitY(GetTriggerUnit()), GetSpellTargetX() - GetUnitX(GetTriggerUnit()))
I am forever grateful. Thanks :3
 
Status
Not open for further replies.
Back
Top