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

Angle Problem

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
575
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.
 
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!
 
Back, posted orig thread at night and just got back from school. Il try it now sec!
 
Status
Not open for further replies.
Back
Top