How do I conduct an action after two seperate clicks?

Get help using Construct 2

Post » Sun May 10, 2015 6:17 pm

Hi! I'd like to know how can I conduct an action after I clicked on two specific objects one after another?
For example, if a cat wants some food (with a image of food above him), I will first click on the food in the tool bar, then click on the food image above the cat, then the food image disappears.
How can I achieve this in C2? Thanks in advance.
B
4
Posts: 4
Reputation: 213

Post » Sun May 10, 2015 6:49 pm

I not sure if i understood properly but
You need to add an instance varable
So if you added the varable on the food above the cat and set that to 2
Than add and event when you click on the image in the tool bar than it subtracts one from the instant varable than you have one when you click on the food above the cat than it subtract another one
Now you add another event that when the instant varable is 0 than the food above the cat dissappers
B
5
Posts: 24
Reputation: 279

Post » Sun May 10, 2015 6:49 pm

If you did not understand than please feel free to question my response
B
5
Posts: 24
Reputation: 279

Post » Mon May 11, 2015 7:31 am

phoenix71717 wrote:If you did not understand than please feel free to question my response


Big thanks! I think this will solve my question! I'll try ;)
B
4
Posts: 4
Reputation: 213

Post » Mon May 11, 2015 5:33 pm

phoenix71717 wrote:If you did not understand than please feel free to question my response


Hello, again!
The technique you told works fine!

I have another question...:

if I have 7 sprites like a toolbar, I want them to be ranked from 0-6 and each one of them have a unique number, so that I can match them with other things in the game.
Do you happen to know how to do this as well? :D

If the discription is not clear for you please send me replies!
B
4
Posts: 4
Reputation: 213

Post » Mon May 11, 2015 5:58 pm

Again instance varable
That thing will be your friend

1. Make a new family and add all the toolbar sprites
2. Right click on family and click instance varable
3. Now add the instance called rank or whatever you want
4. Go on each sprite and make its rank ascending from 0-6
Now when you want something to happen just add another conditon to everything saying whether the rank is 0-6
B
5
Posts: 24
Reputation: 279


Return to How do I....?

Who is online

Users browsing this forum: ametueraspirant, dand, Maydie, mickclarke and 22 guests