How do I get which sprite clicked?

  • I'm clicking a sprite for example grass. And I want a textbox to write "grass". I have a lot of sprites and I can't do same thing to all of my sprites. --> ("Mouse>On object clicked>grass" and then "Text>Set text>Grass")

    I think you get the point. So help me :)

  • I'm clicking a sprite for example grass. And I want a textbox to write "grass". I have a lot of sprites and I can't do same thing to all of my sprites. --> ("Mouse>On object clicked>grass" and then "Text>Set text>Grass")

    I think you get the point. So help me :)

    Mnm That it should work, maybe the problem is in how you compare it doesn't Pick properly or check that you write the Text Grass inside the ""

    hard to say without looking into the Capx

    here is a simple capx I guess you have all your objects separate

    https://www.dropbox.com/s/o7ynvxyjqr49ncx/NameDisplay.capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I'm clicking a sprite for example grass. And I want a textbox to write "grass". I have a lot of sprites and I can't do same thing to all of my sprites. --> ("Mouse>On object clicked>grass" and then "Text>Set text>Grass")

    >

    > I think you get the point. So help me :)

    Mnm That it should work, maybe the problem is in how you compare it doesn't Pick properly or check that you write the Text Grass inside the ""

    hard to say without looking into the Capx

    here is a simple capx I guess you have all your objects separate

    https://www.dropbox.com/s/o7ynvxyjqr49ncx/NameDisplay.capx?dl=0

    Thanks, that was what I was asking for!

  • How do I do if Touch.X > 150 & Touch.X < 300 then do something?

  • How do I do if Touch.X > 150 & Touch.X < 300 then do something?

    You can use (System >>> Is between values)>>> Value:Touch.X (Lower =150 & Upper=300)

    or

    you can use two comparisons in the same Event

    System>>>> Compare two values>>> Touch.x > 150

    System>>>> Compare two values>>> Touch.x < 300

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