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

Angle Problem

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
576
Ok i need help with angles, never been good with them on WE.
I have this: Pick Everyunits owned by [player#] and make unit face target unit of ability being cast. Now i want to move them al away from her but like this.

xox to x o x

Its kinda hard to explain, i want them to move away from her acording to where there back is pointing (they face her) can any of you give me the GUI for this.
 
Level 14
Joined
Jan 15, 2007
Messages
349
I think this should work!

  • Set loc1 = (Position of (Triggering unit))
  • Set group = <your group>
  • Unit Group - Pick every unit in group and do (Actions)
    • Loop - Actions
      • Set loc2 = (Position of (Picked unit))
      • Set angle = (Angle from loc1 to loc2)
      • Unit - Move (Picked unit) instantly to (loc2 offset by -6.00 towards angle degrees)
      • Custom script: call RemoveLocation(udg_loc2)
  • //After the Loop
    • Custom script: call RemoveLocation(udg_loc1)
    • Custom script: call DestroyGroup(udg_group)
I hope I helped you!
 
Level 10
Joined
Jan 21, 2007
Messages
576
Back, posted orig thread at night and just got back from school. Il try it now sec!
 
Status
Not open for further replies.
Top