When Player A finishes constructing an E-bay, all his units gain +1 weapon and armor upgrade.
When player A finishes constructing his second E-bay, all his units gain an extra level of weapon and armor upgrades.
If an E-bay is destroyed, the player looses one level of the upgrades. And if it is rebuilt, he regains it.
What would be a proper system to make the trigger remove upgrades, in case an Engineering bay is destroyed?
(Since a player will be able to construct up to three Engineering bays, and each E-bay adds one extra upgrade level to weapon and armor, so the appropriate level needs to be added or removed.)
I did some testing to see how it would work, and I think the following will be better than my first suggestion:
1
Go into the Data Editor, then find Upgrades and type in "Terran Infantry Armor Level 1" (Or whichever you want to use). On the right panel, scroll down and find "(Basic) Max Level", and change it from 1 to 3 (if you only want three engineering bays max for the player). This is how many times the game will allow the upgrade to be applied in-game, so if it stays at 1, only one Engineering Bay will actually increment the armor for your units.
2
In Triggers, create a variable, such as UpgradeLevel = 0 <Integer>. This will track the progress for one player (if you have more than one player, make UpgradeLevel an array).
3
Create a new trigger. This will almost be the same as my previous post, but with a few changes.
Is it possible to make the trigger display each upgrade level in the unit interface?
Just as on the picture below.
So if a player has 3 Engineering Bays, upgrade level 3/3 will be displayed on the unit. And when one E-bay is destroyed, it will go down to 2/2 again, with the proper icon.
If you set it to increase the upgrade level for the player, it should show up with a 1, 2, 3. Making it display the proper icon might take a little bit more, such as checking to see if the player already has Terran Infantry Armor Level 1 set to 1 so that it can proceed to Armor Level 2 (which would change the icon, I think).
I have built your trigger, but for some reason it does not work properly, despite my attempts in fixing it.
I upload a map with the trigger added.
Each player will be able to build an E-bay, and when it is completed, his Bio units will gain an upgrade level for weapon and armor. When three E-bays have been constructed, the Bio units have gained their max upgrades.
When an E-bay is destroyed, one upgrade level is removed from all Bio units.
I will then create the same trigger for Forge and Evolution Chamber.
I suspect the problem has to do with the Integer and how the trigger checks for it, but I am not sure how to solve it properly, so it works for all players.
The problem was that the trigger I originally recommended used (Triggering unit), but it turns out that because of the setup with the Any Unit construction progress event, the trigger needed to use (Triggering progress unit).
When Player A finishes constructing an E-bay, all his units gain +1 weapon and armor upgrade. When player A finishes constructing his second E-bay, all his units gain an extra level of weapon and armor upgrades.
If an E-bay is destroyed, the player looses one level of the upgrades. And if it is rebuilt, he regains it.
Any ideas how to solve this?
whats the problem?
Not sure how to get it to work.
Whenever a player constructs an E-bay and it is completed, all his units will immediately gain +1 upgrade for weapon and armor.
Which means that a player needs to have 3 E-bays in play at the same time to gain +3/+3.
If one E-bay is destroyed, one upgrade level is removed from the player units. (For example +3/+3 becomes +2/+2)
I assume this must be done via triggers?
Hi
I think something like the following will work if you do it with triggers. It might also be possible using the data editor.
Hope this works
Thanks! Will try it out!
What would be a proper system to make the trigger remove upgrades, in case an Engineering bay is destroyed?
(Since a player will be able to construct up to three Engineering bays, and each E-bay adds one extra upgrade level to weapon and armor, so the appropriate level needs to be added or removed.)
I did some testing to see how it would work, and I think the following will be better than my first suggestion:
1 Go into the Data Editor, then find Upgrades and type in "Terran Infantry Armor Level 1" (Or whichever you want to use). On the right panel, scroll down and find "(Basic) Max Level", and change it from 1 to 3 (if you only want three engineering bays max for the player). This is how many times the game will allow the upgrade to be applied in-game, so if it stays at 1, only one Engineering Bay will actually increment the armor for your units.
2 In Triggers, create a variable, such as UpgradeLevel = 0 <Integer>. This will track the progress for one player (if you have more than one player, make UpgradeLevel an array).
3 Create a new trigger. This will almost be the same as my previous post, but with a few changes.
4 Create another trigger. This one will check to see if an Engineering Bay is destroyed.
Thank you!
Is it possible to make the trigger display each upgrade level in the unit interface?
Just as on the picture below.
So if a player has 3 Engineering Bays, upgrade level 3/3 will be displayed on the unit. And when one E-bay is destroyed, it will go down to 2/2 again, with the proper icon.
If you set it to increase the upgrade level for the player, it should show up with a 1, 2, 3. Making it display the proper icon might take a little bit more, such as checking to see if the player already has Terran Infantry Armor Level 1 set to 1 so that it can proceed to Armor Level 2 (which would change the icon, I think).
I have built your trigger, but for some reason it does not work properly, despite my attempts in fixing it.
I upload a map with the trigger added.
Each player will be able to build an E-bay, and when it is completed, his Bio units will gain an upgrade level for weapon and armor. When three E-bays have been constructed, the Bio units have gained their max upgrades.
When an E-bay is destroyed, one upgrade level is removed from all Bio units.
I will then create the same trigger for Forge and Evolution Chamber.
I suspect the problem has to do with the Integer and how the trigger checks for it, but I am not sure how to solve it properly, so it works for all players.
Alright cool, I took a look at your triggers and it turns out the problem is with what I recommended. A slight change fixes it.
Upgrade Trigger (UPDATED)
The problem was that the trigger I originally recommended used (Triggering unit), but it turns out that because of the setup with the Any Unit construction progress event, the trigger needed to use (Triggering progress unit).
Let me know if you need anything else!