Tower Defense upgrading individual towers

Get help using Construct 2

Post » Thu Oct 03, 2013 7:31 pm

So I'm making this simple tower defense game and everything is going great. Until I try to make towers upgreadable. I have 3 types of towers and each has 7 levels. I put different looking versions (levels) of towers in different frames of default animation. Now. When I build, lets say, two red towers and they're on first level and upgrade one of them, thus changing its frame from 0 to 1, the other one changes too and I have no idea how to fix this. So please help.

Here's the capx (I know it's a mess)
https://dl.dropboxusercontent.com/u/32241884/CAPXs/simpledefense.capx
B
17
S
3
Posts: 26
Reputation: 1,518

Post » Thu Oct 03, 2013 8:23 pm

You could make a variable to track which turret is currently selected by assigning it either the turret's UID or IID.

Then on your events when upgrade is touched, find the turret with the matching UID or IID and then perform the actions.

Right now you are not picking a specific redturret for example, so it applies to all of them. I did the redturret as an example.

https://dl.dropboxusercontent.com/u/119307545/simpledefense.capx
B
26
S
8
G
2
Posts: 33
Reputation: 3,645

Post » Thu Oct 03, 2013 8:40 pm

Thanks a ton man. As you could probably see I was trying to mess around with UID but didn't know what I was doing so yeah.. Thank again!
B
17
S
3
Posts: 26
Reputation: 1,518


Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 12 guests