I have created custom upgrades, which buff armour, damage, period, speed, health, etc. Now at the start of the game players choose a faction which determines their buff. The initial upgrades happen once, and are correct each time.
However, the later upgrades have 3 levels, as I wanted them to be used on 3 separate occasions. This means that they sometimes (rarely) work, often failing to count properly (they multiply, add or subtract terribly).
I tell the trigger what integer of the level to use by having a counting int, which is 0 to begin with, and then +1 each event before the player makes the selection. As a result it should be level 1, 2, 3. And it seems to do something at least... but as I say, I notice the effect for the first level is often twice, if not three times that of the values in the upgrade.
What could be wrong?
Thanks in advance for any suggestions.
I think part of it may be since the int that says what level levels an upgrade to level 3, if it's the third event, then it gives a level 3 upgrade, even if it's the first time it's researched. So err, bad design there. But I'll need to investigate more for the issue of them giving dodgy results for the first time...
Fixed it! I ended up settinng the interative check to an array, one slot for each player, and making one for each upgrade. Now it counts properly!
So, problem was the upgrades needed one var for each player using each one, one for everyone or every player per age doesn't work when levels combine the values... eg 3 = 1 + 2 + 3. Thanks anyway!
Hello,
I have created custom upgrades, which buff armour, damage, period, speed, health, etc. Now at the start of the game players choose a faction which determines their buff. The initial upgrades happen once, and are correct each time.
However, the later upgrades have 3 levels, as I wanted them to be used on 3 separate occasions. This means that they sometimes (rarely) work, often failing to count properly (they multiply, add or subtract terribly).
I tell the trigger what integer of the level to use by having a counting int, which is 0 to begin with, and then +1 each event before the player makes the selection. As a result it should be level 1, 2, 3. And it seems to do something at least... but as I say, I notice the effect for the first level is often twice, if not three times that of the values in the upgrade.
What could be wrong? Thanks in advance for any suggestions.
Maybe post a more detailed list of your triggers? Do the upgrades work normally if researched using a Research ability?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I think part of it may be since the int that says what level levels an upgrade to level 3, if it's the third event, then it gives a level 3 upgrade, even if it's the first time it's researched. So err, bad design there. But I'll need to investigate more for the issue of them giving dodgy results for the first time...
Fixed it! I ended up settinng the interative check to an array, one slot for each player, and making one for each upgrade. Now it counts properly!
So, problem was the upgrades needed one var for each player using each one, one for everyone or every player per age doesn't work when levels combine the values... eg 3 = 1 + 2 + 3. Thanks anyway!
In other words trigger problem and not data.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg