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

In-Game Rotation

Status
Not open for further replies.
Level 4
Joined
Feb 3, 2011
Messages
56
Hi is there way for a building to be rotated by the player in-game for cosmetic purposes only? Like as the building ability? I want to create placeable barricades.
 
Level 8
Joined
Sep 23, 2007
Messages
357
Make an ability, give it to the unit

Make a trigger:


Event:
Unit Starts Casting an Ability

Conditions:
Ability equal to X

Actions:
Unit - Make Casting Unit Face (Facing of Casting Unit + 90) over 0.00 seconds

This makes the unit rotate by 90 degrees. If you want to change how much the unit rotates, you can change this. Also, if you want the rotation to make a small, but very significant and great difference in gameplay, change the Pathing Texture of the barricades to Hay Cart (same as Short Fence). This will make them act sort of like a short fence, where they act like more of a rectangle than a square.
 
Level 4
Joined
Feb 3, 2011
Messages
56
Thanks so much for that I'll get on it. But uh.. what ability do I base the rotate ability off of?.... Didn't think of that...
 
Last edited:
Level 4
Joined
Feb 3, 2011
Messages
56
I did the trigger and I want to see if it works but the barricade isn't appearing on the map when I test it. The base unit is a tower, pathing map is a hay cart, and model file is the barricade doodad. Any idea why?
 
I recommend setting the base ability to berserk as it doesn't stop any orders and is instant, if you do use Berserk make sure to set the ability duration to .01 seconds so it doesn't come up with a buff.

to let the building turn it needs a turn rate so if you add a turn rate to the unit it should be able to turn (haven't tested though :q) before you try to turn it and then after you can set it to 0.00(like it initially was or it can turn)after you turned the building.
  • Animation - Change (Triggering unit) turn speed to 0.01
Also Miles111 he wants it to still be a building.
 
Status
Not open for further replies.
Top