I am making a Tower Defence game for my school homework, and I wanted to create a menu that can upgrade the towers. The menu works fine, however I don't seem to be able to actually affect anything and i'm unsure why. When I click on an upgrade, the cash goes down but doesn't seem to actually do anything.
Here's a screenshot of the Event Sheets:
And here's a link to the actual capx file: tinyurl.com/hk5b9x9
Thanks a lot! I appreciate all the help!
Develop games in your browser. Powerful, performant & highly capable.
I can't see any action specifying which Turrets or which Laserbeams to affect in any of the last four actions - you need to tell your events which instances of each object to apply the actions to first.
An easy way I can see to do this using the actions you've currently got is by adding a variable to your UpgradeMenu object, call it something like 'SelectedTurretUID'. In your action that creates the menu, set this variable to the UID of the clicked turret.
In all subsequent actions you can then use the 'Pick by UID' condition to direct the code to the correct instance of the object