Simple Question About Making a Tower Defence Game

Get help using Construct 2

Post » Thu Aug 22, 2013 8:18 pm

Hello friends,

I am trying to develop a tower defence game nowadays. I am trying to set up basic logics of a tower defence game in my mind with construct 2. You know, in tower defence games sometime you want to sell your tower. When you click the tower sell button appears near the tower and when you click the sell button the tower disappears. I am ok with this part. But if i create same type of towers more then once and i click sell button to sell just one of the towers, all towers disappears.

I want just one tower to disappear, not all of them. How do i set up this logic?

Here is the capx file link:
https://www.dropbox.com/s/d8plif96p6fl02y/example.capx

You can drag and drop new towers by clicking the green rectangle.

Thanks for your helps.
B
7
S
1
Posts: 17
Reputation: 553

Post » Thu Aug 22, 2013 9:06 pm

I put a variable on the "Sellimage" that keeps the tower's UID, and then, when you touch it, only the tower and the image is destroyed

example_fixed.capx

EDIT: Oh, I forgot to tell that I disabled the way you were doing... When you use the event "Is touching Object", every second that you are touching the object, the actions are executed a lot of times... So I changed to "On touched Object", that execute only once.Seasky2013-08-22 21:11:16
B
21
S
8
G
7
Posts: 49
Reputation: 5,274

Post » Thu Aug 22, 2013 9:10 pm

@Seasky Thank you very much. awesome. :)
B
7
S
1
Posts: 17
Reputation: 553


Return to How do I....?

Who is online

Users browsing this forum: divsyntax, volumetv and 8 guests