How can i click on one sprite?

0 favourites
From the Asset Store
Click! Click! 136 click sounds for your video games or media projects
  • I have 2 sprites one under another. If i click on one of them, condition for 2nd sprite comes too. Is it possible to separate them?

  • I don´t understand what you mean, > If i click on one of them, condition for 2nd sprite comes too < what do you mean by the ¨condition¨ you mean when you click on one of them they´re both selected, if so put them on different layers and lock one of them, maybe you could do something else. if not then please send a screenshot

  • You can add: Sprite->Pick top instance

    to just get the top one.

  • I don´t understand what you mean, > If i click on one of them, condition for 2nd sprite comes too < what do you mean by the ¨condition¨ you mean when you click on one of them they´re both selected, if so put them on different layers and lock one of them, maybe you could do something else. if not then please send a screenshot

    I mean, when i click on one, i add to global variable +1, on anothe +2, but if i ckick on the sprite which is on the top -> the result is +3. It means that on my one click 2 events on 2 sprites were raised.

  • You can add: Sprite->Pick top instance

    to just get the top one.

    Is this an event? If yes, it doesn't work ((

  • You'll need to post your project to get any useful help then.

  • You'll need to post your project to get any useful help then.

    I've created test project which has the same behavior. When i click on red circle, i want to get +2, not +3.

    1drv.ms/u/s!Aq_JBfHMA5t1kV_aN_Q_yHMeYC4B

  • Construct has no concept of one object obscuring another. You need to handle that yourself. You'd need to explain more on what you are ultimately trying to do. You can use a single sprite with different frames or animations, then the 'top' condition works. Otherwise you can use families, and the 'top' condition, and use an instance variable with your points, assigned by object, rather than hardcoding the values. I'd need more info to provide the appropriate demo.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct has no concept of one object obscuring another. You need to handle that yourself. You'd need to explain more on what you are ultimately trying to do. You can use a single sprite with different frames or animations, then the 'top' condition works. Otherwise you can use families, and the 'top' condition, and use an instance variable with your points, assigned by object, rather than hardcoding the values. I'd need more info to provide the appropriate demo.

    Hello, i'm trying to create an aim for shooting gallery, where every circle gives different number of points for every hit.

  • So a single sprite is all you need.

    http://www.blackhornettechnologies.com/Construct3Stuff/Samples/lisi4king_test1_bht.c3p.zip

    (Just remove the .zip)

  • So a single sprite is all you need.

    http://www.blackhornettechnologies.com/Construct3Stuff/Samples/lisi4king_test1_bht.c3p.zip

    (Just remove the .zip)

    Strange, but i can't open this file. I extracted .zip and see, that project has .c3proj. If i try to open it in C3, i see an error: Please choose valid C2-C3 project file. Could you please explain me, how can i open it? Thanks.

  • Use R111 and simply drag drop the file in the start page, it worked right away for me.

    In a project where the Sprite sp1 has two different frames :

    | Global number gv_sum‎ = 0

    + System: On start of layout

    -> txt1: Set text to gv_sum

    + Mouse: On Left button Clicked on sp1

    ----+ sp1: Pick top instance

    --------+ sp1: Animation frame = 0

    ---------> System: Add 2 to gv_sum

    --------+ System: Else

    --------+ sp1: Animation frame = 1

    ---------> System: Add 1 to gv_sum

    + (no conditions)

    -----> txt1: Set text to gv_sum

    Otherwise you can also check out this tutorial to do a shooting gallery: scirra.com/arcade/tutorial-games/shooting-gallery-2252

  • Use R111 and simply drag drop the file in the start page, it worked right away for me.

    In a project where the Sprite sp1 has two different frames :

    | Global number gv_sum‎ = 0

    + System: On start of layout

    -> txt1: Set text to gv_sum

    + Mouse: On Left button Clicked on sp1

    ----+ sp1: Pick top instance

    --------+ sp1: Animation frame = 0

    ---------> System: Add 2 to gv_sum

    --------+ System: Else

    --------+ sp1: Animation frame = 1

    ---------> System: Add 1 to gv_sum

    + (no conditions)

    -----> txt1: Set text to gv_sum

    Otherwise you can also check out this tutorial to do a shooting gallery: scirra.com/arcade/tutorial-games/shooting-gallery-2252

    I've checked an example and it looks to complex for me. So there is no possibility if 2 sprites one on another to define which object was clicked? So why does Event for mouse has a name "On object click" if in real it clicks everything what under this point and it can be 100 objects? May be it is good to change the name or description for this event?

  • Just remove the ".zip" from my file, and you can see how it works.

  • Just remove the ".zip" from my file, and you can see how it works.

    How is it possible to delete .zip from archived file? If i delete it every time return *.zip back. I can only unzip it.

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