HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problem with upgrades that level skills

07-06-2004, 12:57 PM#1
NecroDragon
i have got a problem:

i want that an upgrade levels a skill used by only one structure type.
Now, when i research the upgrade the existing structures that use this skill are correctly upgraded but when i build another structure of that type it still has the lvl1 version of the skill.
Does anyone know what to do or has another idea of realizing my goal on a different way?
07-06-2004, 05:10 PM#2
Panto
That's not how it's supposed to work. New structures that are set to use that tech should have it when they're built. Can you describe your situation in a little more detail? Maybe there's a subtle difference that you haven't mentioned.
07-06-2004, 05:15 PM#3
BlueSpine
I have a possible solution, I do not completely understand the problem. When upgraded, the building 's ability is leveled up? If that is the case then I can help, but it's going to involve some trigger work.

The first problem is that since I assume that your buildings are not heroes, the easier method of the Action, Hero - Learn Skill will not be available, because if your buildings were hero based... it would look funky.

So what you have to do is create an individual ability for each level. I'm going on the assumption that the building starts with the Level 1 version of this ability. (Example: If the building's ability was Bash, you would have to make three custom Abilities by the name of Bash (Level 1), Bash (Level 2), Bash (Level 3) with the respective stats)

Okay then:

Variables
Create a Integer Array named CurrentUpgrade ("#"). The value of the array should equal the number of players who can build the upgrader and building in question. (I'm going to complete this for Player 1 (Red), so the array value ("#") will be (1)) The intial value should be zero.

Triggers
Trigger One: Number of Upgrades for Player 1 (Red)
Events: Unit - A unit owned by Player 1 (Red) Finishes an upgrade
Conditions: UNIT-TYPE COMPARSION::: (Unit-type of (Triggering unit)) Equal to |Upgraded Building|
Actions: Set CurrentUpgrade (1) = (CurrentUpgrade (1) + 1)

Trigger One: Setting the Ability to Level 2 for Player 1 (Red)
Events: Unit - A unit owned by Player 1 (Red) Finishes construction
Conditions: UNIT-TYPE COMPARSION::: (Unit-type of (Triggering unit)) Equal to |Building with Ability|
INTEGER COMPARSION::: CurrentUpgrade (1) Equal to 1
Actions: Unit - Remove Bash (Level 1) from (Constructed structure)
Unit - Add Bash (Level 1) to (Constructed structure)

Trigger One: Setting the Ability to Level 3 for Player 1 (Red)
Events: Unit - A unit owned by Player 1 (Red) Finishes construction
Conditions: UNIT-TYPE COMPARSION::: (Unit-type of (Triggering unit)) Equal to |Building with Ability|
INTEGER COMPARSION::: CurrentUpgrade (1) Equal to 2
Actions: Unit - Remove Bash (Level 1) from (Constructed structure)
Unit - Add Bash (Level 3) to (Constructed structure)

I hope that helps.
07-06-2004, 06:01 PM#4
NecroDragon
oh i'm sure the possibility with the triggers will work, but i think there sould be a way to get it more elegant. so once again my problem:

i have got a building A. this building can research an upgrade that increases the level of a skill S. Now i have a building B1 that uses the skill S and is build BEFORE the upgrade is done.Afterwards this building has the skill S on level 2. Now when i build another building B2 of the same type as B1 that uses, logically, the skill S, too, this building still has the skill S on level 1.

that must be a bug !! or have i probably forgotten to make some settings?
07-06-2004, 06:07 PM#5
BlueSpine
The elegant method you are searching for does not exist. Just as Panto stated, it's not supposed to work that way. The triggers I created seem to be the only possible solution. They're not elegant... but you could change the font type to Elegante if you did so desire. Then they'd be more elegant. Sometimes the hard way is the right way.
07-06-2004, 06:39 PM#6
ForsakenSoldier
Wait, NecroDragon, are you saying that the upgrade isn't affecting "B2"? Because if the upgrade isn't affecting all the buildings of the same type, then yes, it is a bug.
07-06-2004, 06:49 PM#7
NecroDragon
but the upgrade works in the "normal" warcraft: the skeleton mastery ist just what i want: the existing necros can raise 1 warrior and 1 mage and the necros that are trained later, too, can raise 1 warrior and 1 mage

ok, i want this for another type of skill but the way of working is the same
it can't be that this doesn't work without triggers :(
07-06-2004, 09:25 PM#8
Panto
If I were you, I'd look carefully through all the little things. Make sure the towers are using the right upgrade, that the upgrade changes what you want it to, that there's nothing else affecting the tech level or any of your buildings, etc. It might be that there's something small hidden somewhere that's causing the malfunction.
07-07-2004, 06:59 AM#9
NecroDragon
hmm
i just noticed that all works with another unit in my map.
could the fact that my buildings B are the upgraded form of another builging T change anything ?

so once again. i build 2 towers of the type T and upgrade 1 of them to the stronger version B which uses the skill S. then i research the tech that levels the skill S. the existing structure of the type B uses the skill S on level 2 but when i upgrade the other tower T it only uses the lvl 1 version of the skill S
:<