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

[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?
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
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.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
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.
Top