How do I conduct an action after two seperate clicks?

0 favourites
  • 6 posts
From the Asset Store
Click! Click! 136 click sounds for your video games or media projects
  • 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.

  • 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

  • If you did not understand than please feel free to question my response

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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?

    If the discription is not clear for you please send me replies!

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)