Warcraft III resources & community, 2003–2006 · archived

Applying upgrades instantly

6 posts
#1

Applying upgrades instantly

Heya people, i've got a cute little map called
StarCraft Zone Control.
The marines used in the map can be upgraded, both weapons and armor.
How can i make the upgrades apply instantly when the upgrade is done, current upgrades are only applied to the newly spawned units.

(the units are created, not trained)
Thanks in advance,
Angelusz
#2
That's interesting. In melee, upgrades affect all units, not just new ones. What are you doing to upgrade them?
#3
Well, i made custom upgrades, how:
Took normal damage upgrade, copied it, and started editing it to fit it to my map.

The upgrades are gun upgrades which increase damage of the marines by 1 per upgrade, max lvl = 50.

I did something else for armor, every upgrade the marines get +1 armor, and one level of enforced armor.
(enforced armor = hardened skin, blocking damage)
enforced armor lvl blocks 1 damage, lvl 2 2 damage and so on, that + 1 armor lvl.
The minimum damage = 0, but, there's a % chance that the damage will be blocked, so it's not 100% reliable.
(the higher you upgrade armor, the higher the % gets.)

The marines are spawned by triggers, as simply as possible:

Event: a bunker is made at location X
Then: 
Set location X owner = Owner of triggering unit
Trigger - turn on spawn units location X

Event: Every 4 seconds of the game
Then: Unit - create 1 marine for (Location X owner)

Event: Bunker dies
Then: Turn off spawn ...


That is not the exact code, but it's something similar to that (a bit more complicated.)[/code]
#5
bump! still need to find how this works :p
#6
H
E
L
P