• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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