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

[Trigger] Create Unit _ LOcation

Status
Not open for further replies.
Level 2
Joined
Sep 14, 2007
Messages
15
I want to make a trigger that creates 3 units betwwen two units, So:
[unit one] created units [unit two]
The created units shall be near unit one but created on the 'way' to unit two.....

Pls Help
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
  • Actions
    • Set Unit1 = <unit 1>
    • Set Unit2 = <unit 2>
    • Set Loc1 = Position of Unit1
    • Set Loc2 = Position of Unit2
    • Set Distance = Distance between Loc1 and Loc2
    • Set Angle = Angle between Loc2 and Loc1
    • Set Loc = Loc2 offset by (Distance - (Distance/4)) towards Angle
    • Unit - Create 3 <unit type> at Loc facing 0.00 (or whatever)
    • Custom script: call RemoveLocation(Loc1)
    • Custom script: call RemoveLocation(Loc2)
    • Custom script: call RemoveLocation(Loc)
 
Status
Not open for further replies.
Top