• 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] Buying unit makes 5 and converts

Status
Not open for further replies.
Level 3
Joined
Oct 15, 2007
Messages
43
Actually I would like a place to start, not sure how to begin such a thing.

Basically say player 1 builds a unit in a specific barracks, it would then make a group of 5, then convert to player 2.

This is set up so that that triggers would auto send the units along trigger paths in a different trigger.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Do you mean like this:
  • Events
    • Unit - A unit Finishes training a unit
  • Conditions
    • (Triggering unit) Equal to Your Barracks
    • (Owner of (Triggering unit)) Equal to Player 1 (Red)
  • Actions
    • Set Unit = (Trained unit)
    • Set Point = (Position of Unit)
    • Unit - Change ownership of Unit to Player 2 (Blue) and Change color
    • Unit - Create 4 (Unit-type of Unit) for Player 2 (Blue) at Point facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_Point)
    • Custom script: set udg_Point = null
    • Custom script: set udg_Unit = null
This will create a group of 5 units for Player 2 when Player 1 trains a unit.
This way is leakless too.
 
Status
Not open for further replies.
Top