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

Attack Damage Upgrade error?

Status
Not open for further replies.
Level 4
Joined
Jun 14, 2010
Messages
68
Alright, I'm trying to use an Attack Damage Upgrade and an Attack Dice Upgrade to add some flavor to my map, but there appears to be a problem with the Attack Damage Upgrade: When I decrease its level, the attack damage of the units who use it does not go back down.
Is it just a nuance of the Attack Damage Upgrade? Did I code something wrong? What's goin on here?

Here's a snap of the important parts of the upgrade:
attachment.php


Here's the code lines that change the level of the upgrade (no they're not the actual lines, I changed some variables for simplicity, both in this post and in the actual code):
  • Player - Set the current research level of Attack Damage to 21 for (Owner of (Triggering unit)
  • Player - Set the current research level of Attack Damage to 1 for (Owner of (Triggering unit)
So, in theory, the unit should get a +20 attack boost for the first bit of code, then fall to a +0 for the second. However, it gets the +20 and then nothing happens when the second is activated. The Attack Dice Upgrade does the same thing and has the same code.

If this is a nuance of the Attack Damage and Attack Dice Upgrades, are there Abilities that I could use instead?
 

Attachments

  • Screenshot 2.png
    Screenshot 2.png
    316.4 KB · Views: 204
Level 4
Joined
Jun 14, 2010
Messages
68
Your base value should be something higher than 0 start it off at 1 if you'd like

Well thanks for the tip, but on a clean map with just the upgrade, some simple triggers and a unit with the upgrade it still doesn't work even if I have the base value at 1. It still gets stuck :/
 
Level 8
Joined
Jun 26, 2010
Messages
530
You can't downgrade neither Upgrades or Researches. It's hardcoded.
Use Tirlititi suggestion. And uses abilities for triggering the upgrades, not upgrades themselves.
 
Level 4
Joined
Jun 14, 2010
Messages
68
It's clearly written in the trigger where you upgrade your units:
Techtrees can't be downgraded, or something like that.

How's this for clearly written bro: "Tech cannot be unlearned through the use of this action." Unlearned as in set back to 0? Or unlearned as in downgrading? Just sayin.

In any case, now I got a problem. See, I was using Upgrades for a few things, including Attack Range which is unalterable otherwise. Any idea how to do this? Thinking about making different units with different built-in ranges but... argh... I guess that's what I have to do huh? Please, give me something else! I think I can get the rest pretty easy.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
When you learn a spell, you can unlearn it by, example, using the Tome of Retraining. Still, tech can't be unlearned (set do lower values).

Unfortunately, range modifications are exclusively for techtrees. It's hard and desperate GUI, JASS or other type to make it downgradeable.
 
Level 4
Joined
Jun 14, 2010
Messages
68
When you learn a spell, you can unlearn it by, example, using the Tome of Retraining. Still, tech can't be unlearned (set do lower values).

Unfortunately, range modifications are exclusively for techtrees. It's hard and desperate GUI, JASS or other type to make it downgradeable.

well i'm desperate, any points in the right direction?
 
Last edited:
Status
Not open for further replies.
Top