• 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] Adding unit to building train list

Status
Not open for further replies.
Level 3
Joined
Apr 5, 2007
Messages
51
I'm not sure if this is a GUI/JASS or a actual trigger, but ive seen it in some maps for example:
the barrack starts out with having a grunt on the list to train
after a certain amount of time, the barrack is able to train headhunters and grunts


anyone know the triggering to this? if you can post it, thanks :)

Tankass
 
Level 6
Joined
Feb 2, 2005
Messages
205
Maybe they just add those Units or they set an Techtree one level up and give those unit the tech require stuff. I'm not sure if adding works so i will give you the techtree example.

2nd would look like this
  • Events
  • Time - Elapsed Game Time 50 secs
  • Actions
  • Player - Set the current research level of DummyTech to 1 for Player 1 (Red)
Now add the DummyTech to tech Requierd to build and you're done
 
Level 3
Joined
Apr 5, 2007
Messages
51
what about for like custum units? i viewed the techtree and it just came up with basic and campaign units
 
Level 9
Joined
Jul 27, 2006
Messages
652
Requirements

Every unit has a list of requirements to train, these could be upgrades or units. For example so units require another building to be built before they can be trained.
Create a dummyunit, add that unit as a requirement for your unit and when the unit can be trained use a trigger to create it in a secret, unacessable area.
By the way, the requirement showen ingame will be the dummy units name.
 
Dude do:
Event:
Map Initailisation
Condition:
(none)
Actions:
Player - Limmit # of (whatever unit) for (whatever player) to 0

Just do that for all units
Then when you want it avialable do:

Event:
(whatever)
Condition:
(whatever)
Action:
Player - Limmit # of (whatever unit) for (whatever player) to 999999

(unless the unit doesnt use food, youll never hit that number)
 
Status
Not open for further replies.
Top