Spawn unit at a specific point

Status
Not open for further replies.
Level 2
Joined
Mar 5, 2020
Messages
10
Hey,
I have some buildings where i can buy units. How can i define the exact point where units appear when they are bought? They are all spawning on the bottom left of each barrack for now
 
Create a Point variable and this trigger:

Edit*
  • Events:
  • A unit finishes training a unit
  • Actions:
  • Set Variable Point1 = Position of Triggering unit
  • Set Variable Point2 = Point1 offset by X distance towards X angle
  • ^ This is called point with polar offset
  • Unit - Move trained unit instantly to Point2
  • Custom script: call RemoveLocation(udg_Point1)
  • Custom script: call RemoveLocation(udg_Point2)
 
Last edited:
Create a Point variable and this trigger:

  • Events:
  • A unit finishes training a unit
  • Actions:
  • Set Point equal to position of triggering unit offset by X distance towards X angle <--- This is called point with polar offset
  • Move trained unit instantly to point
  • Custom Script: call RemoveLocation(udg_Point) <--- Replace "Point" with the name of your Point variable, keep everything else exactly as it is
Doesn't it leak (Position of (Triggering unit))?
 
Status
Not open for further replies.
Back
Top