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

Changing owner of a building after it's finished

Status
Not open for further replies.
Level 3
Joined
May 12, 2008
Messages
42
I want to be able to make a barracks via triggers train (unit type) and ever unit that is trained goes to computer controlled and attacks.

I tryed useing the Unit Type variable but it wont work :sad:
 
Level 24
Joined
May 9, 2007
Messages
3,563
Ok, one sec. Will work on triggers.

  • Your Ability
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Footman
    • Actions
      • Unit - Change ownership of (Trained unit) to Player 3 (Teal) and Change color
Does this not work. Are you sure?
 
Level 24
Joined
May 9, 2007
Messages
3,563
Fairly easy. Give one sec.

  • Your Ability
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to train/upgrade to a Footman
To reduce lag:

Change Time to 2-5 seconds.

Change unit group to something more specific.
 
Level 24
Joined
May 9, 2007
Messages
3,563
Make a custom unit group.

A variable.

At the start of the game set it to "Zombie Pit".

Or if you want it to only effect the Zombie Pit unit type all game.

Do this.

  • Spam
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Add all units of (Units of type Zombie Pit) to YourUnitGroup
 
Status
Not open for further replies.
Top