How do I Upgrade my Towers

Get help using Construct 2

Post » Sat Jan 07, 2017 7:35 pm

Message: Mord can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
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:

Thanks a lot! I appreciate all the help!
Posts: 20
Reputation: 379

Post » Mon Jan 09, 2017 12:14 am

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 :)
<iframe frameborder="0" src="" width="552" height="167"></iframe>
Posts: 254
Reputation: 2,389

Return to How do I....?

Who is online

Users browsing this forum: Rodak and 13 guests