Hi.
I\'m writing a Tower Defense type of game.
I\'m at the moment working on the upgrade system of my towers. I use a sprite as a button (BTNUpgd). When this button is clicked,it is supposed to upgrade private variables in an other object (OBJ is a family of towers that contains HQ, GunTower, etc...).
When I try, selecting HQ at launch, and clicking on the first BTNUpgd in top right of screen (Private Var Num 1 for this object - Line 43 in the.cap)
=> Stat1Upgd in HQ is not updated
=> armor in HQ is updated though
=> money in VARLvl is updated (but)
=> stat1cost * 2 is affected to stat3upgd (seen in debugger) in HQ
So the rest of the block displays no change (as stat1upgd has not been updated).
When clicking on the 2nd BTNUpgd (Num 2)
=> Stat1Upgd is updated with +1 instead of Stat2Upgd
=> range is updated
=> Stat1Cost (instead of Stat2Cost) is updated with *2
When clicking on the 3rd BTNUpgd (Num 3)
=> Stat3Upgd is not updated
=> Stat2Upgd (instead of Stat3Cost) is updated with *2
Also, when playing a bit with this non-expected behaviour, the fact of clicking
VARLvl is a label in which I store my \"local\" private variables.
I see no logical reason in my code for the software to act like this.
Let me know if you need anything more.
I'm adding the .cap => http://www.box.net/shared/1dkxz8cevu
It wouldn't let me upload on sourceforge ^^
Forgot to tell
Construct version : 0.99.91