How do I add points when sprite clicked, else subtract point

Get help using Construct 2

Post » Wed Nov 26, 2014 6:41 am

Hi there,

I've been trying to accomplish the following:
I want a player to click blocks: if he clicks a block with a certain colour, he scores, but if he clicks outside the block or on a block with the 'wrong' colour, points should be subtracted...
I've been trying (boolean) instance variables, but can't seem to get the thing working.
Actually I only want to know if a boolean instance variable is the way to go or are there other ways?

Thanks in advance!
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,316

Post » Wed Nov 26, 2014 8:11 am

Hi @ Rjan - boolean is for true false.

It sounds like you need to do an event on mouse click / tap then nest a condition about whether the correct object was clicked - upscore if it was and downscore if it wasn't.

If you upload a capx of what you're trying to do we could have a look at it.
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, plinkie, rayolf and 10 guests