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

[Solved] Turn a unit with movespeed 0 in triggers

Status
Not open for further replies.
Basically need the unit to be turned using only triggers but I need to disable the user's ability to turn outside of trigger, so setting propulsion to 0 wont work since right clicking would still change the unit's facing angle.
But setting movespeed to 0 causes BlzSetUnitFacingEx to not work at all.

Tried using SetUnitPositionLocFacingBJ but that somehow "lags" behind, like the next time it triggers the unit will turn to the previous facing angle.

Any ideas?
 
Edit the model. Make the whole thing attached to a special bone called head or something, then you can use the action to lock a units facing bone to another unit so it will always face that bone toward that unit. Since the whole model is now attached to that bone the model will face the locked unit at all times.

Simply move the locked unit to where you wish the turning unit to face.
 
You can use an Order Event to detect when the Player attempts to make the unit turn, then Stun it, Order it to Stop, and then Unstun it.

I forget which of these works best:
  • Unit - Pause (Triggering unit)
  • Unit - Order (Triggering unit) to Stop
  • Unit - Unpause (Triggering unit)
  • Custom script: call BlzPauseUnitEx(GetTriggerUnit(), true)
  • Unit - Order (Triggering unit) to Stop
  • Custom script: call BlzPauseUnitEx(GetTriggerUnit(), false)
You may need to replace the "Stop" order with a Point order with a 0.0 offset.

I know I've gotten this to work in the past where I had complete control over the unit's turning using triggers.
 
Last edited:
Status
Not open for further replies.
Back
Top