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

[General] Upgrade and Spawn

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi

Need help with:
  • Unit - A unit Finishes an upgrade
I have barracks (example)
A player upgrades Barracks to Barracks 2.
The trigger sees when upgrade is complete, then starts to build the units from Barracks 2.

This isn't about a research. I want to build units automatically through a trigger upon upgrade of a building. Since I couldn't find a "Upgraded Unit" in the unit-type, I'm stuck.
 
Level 6
Joined
May 4, 2012
Messages
187
I don't this but I think you can use the Unit - Create units facing angle or what. I'm not really sure about it...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You can use Boolean variable for this.
Puts a check there whether the Boolean is True or False

Let's say you have a Boolean variable named "Upgrade" and initially, you set it to False.

Each time the building is trying to build a unit via triggers, put an IF/THEN/ELSE function there

When that building finished an upgrade, just set the Boolean to True, meaning the building is already been upgraded and will spawn new units instead old ones
 

sentrywiz

S

sentrywiz

Thanks, I figured it out myself.
No need for further discussion
 
Status
Not open for further replies.
Top