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

How to make units face another unit

Status
Not open for further replies.
Level 4
Joined
Apr 2, 2008
Messages
65
just tried it doesnt work heres my trigger

Event
Unit - A unit starts the effect of an ability

Condition
Ability being casted equal to Clone Hold

Action
Set CloneHoldTarget = to Posistion of Targeted Unit
If level of clone hold for triggering unit equal to 1 then do Create 1 cloneunit for owner of triggering unit at target point ability being casted facing CloneHoldTarget else do nothing
make last created unit face targeted over .05 seconds
add a 1 second generic experation timer to last created unit
(then copy and pasted and changed for each level)
 
Last edited:
Level 10
Joined
Sep 6, 2007
Messages
440
Set a variable to declare the facing of a unit. Probably an unit variable where this should be whoever you want your creatures face to. Then use Animation - Make unit Face unit. Put your own unit to face your caster. Also, copying and pasting with only minor changes ( such as waits ) is not good. Actually making waits is not good but anyway. Use wait 1 x Level of ability being cast or whatever formula you want to tell the game wait that long. It helps your code to be read easier.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
create it with facing to => Direction Between (Position of (Last Created Unit)) and (Position of (Target Unit of ability being cast))
 
Status
Not open for further replies.
Top