• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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