• 🏆 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!

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