Replace units from Building-Sell Units list

Rushhour

New Member
Reaction score
46
Hi, I'm going to explain this a little more in detail, sorry for the long text ;)
For this example I have a Frog which I want to upgrade to Godzilla :D
The building has the "Sell Units" ability.
I added Frog to the building that's supposed to sell this unit. Later in game, a second building can upgrade the Frog to Godzilla (it's done by a trigger that looks like this:
Neutral Building-Remove Frog
Neutral Building-Add Godzilla.)

First I thought this would be finde, but then I realized some strange bugs. When I replace my second unit for example, it's replaced correctly but another third unit is removed (not replaced). I checked some things: the spells used for upgrading have different order Ids; I also put in some debugmsgs and the only trigger that removes this unit isn't launched!

Then I tried to use the regular system of blizzard, as the Orcs use for their trolls: Upgrading Trollheadhunter to Trollberserker. I almost copy pasted all of the abilities, upgrades and added it to units and the building. It's the ability with the effect: Unit-Change Unit Availability (not sure about the correct English translation here)

But here I even have more problems.
First: At the the regular Orc Casern both units are added in the Objects Editor's list, though you don't see and can't train Troll Berserker ingame before upgrading.
I did so too but my building ingame can trainb oth, the Frog and Godzilla.
When upgrading, the Frog disappears and all frogs are replaced with godzilla correctly.
Second: I want the building not to train but to sell the units, but that system doesn't seem to work for sold units at all.
Am I right there?! Any way to change it? Or did I just do a common mistake?

Final Edit: Well I don't understand it, but I think I found the problem. The order was the problem. I had a trigger that added the normal, not upgraded units to all buildings. And in this loop the unitorder wasn't the same like the upgrade-order. I don't know what happens if I ever want to change the order to be more "random".. Never change a running system, I leave it that way, until someone come's out with a better solution ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top