Upgrade reseter

Monictor

New Member
Reaction score
0
Making a game where players buy units and upgrade them to eventually fight each other in a battleground. When players buy units a building is made for that unit which contains its upgrades.

After every battle i need the upgrades to be reset.

So I made this trigger so that when the unit dies, its upgrades for that player are supposed to reset to 0. A player can only have 1 type of unit at a time.

Here is an example of one of the triggers:

Trigger:
  • Demon reset
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Demon Lord
    • Actions
      • Player - Set the current research level of Demon Armor to 0 for (Owner of (Triggering unit))
      • Player - Set the current research level of Hit Point Bonus Demon to 0 for (Owner of (Triggering unit))
      • Player - Set the current research level of Speed Bonus Demon to 0 for (Owner of (Triggering unit))
      • Player - Set the current research level of Vampirism to 0 for (Owner of (Triggering unit))
      • Player - Set the current research level of Demon Rake +1 to 0 for (Owner of (Triggering unit))


However, this does not work. The units still have the upgrades when they are recreated, and they are not in the upgrade building. Is there a way to reset upgrades?
 

Asdfblah1

New Member
Reaction score
10
Upgrades cannot be downgraded. They're called upgrades for a reason.

I think in the new starcraft they'll be downgradeable
 

Monictor

New Member
Reaction score
0
Dammit dammit dammit dammit dammit.

So what's the point of the "set research level" function?
 

Faust

You can change this now in User CP.
Reaction score
123
A replacement solution would be to make upgrades units. Wouldn't be easy to pull off, needs jass and stuff probably. There is a system called UnitProperties (I think) that could help you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top