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

[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