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:
Image

And here's a link to the actual capx file: http://tinyurl.com/hk5b9x9

Thanks a lot! I appreciate all the help!
B
9
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 :)
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, Yahoo [Bot] and 15 guests