How do I choose another sprite

  • Hi.

    If I have two of one sprite on my layer, and touch one of them, the boolean for this sprite will be set to "true".

    But If I now touch the other sprite, the boolean on this sprite also be set to "true".

    How do I set the first touched sprite to boolean "false", when I touch the second sprite?

    It is only one sprite, but I have placed two of the same sprite on the layer.

    There must only be one af the sprites on boolean "true" at the same time.

    Please help, thanks

  • one way to only select one is to first deselect all..

    sprite on touched

    (sub) system pick all sprite

    sprite set selected to false

    (sub)

    sprite set selected to true

    where both subevents are on the same level..

    the first subevent will select all and set them to false,

    the second will still reference the touched sprite..

  • one way to only select one is to first deselect all..

    sprite on touched

    (sub) system pick all sprite

    > sprite set selected to false

    (sub)

    > sprite set selected to true

    where both subevents are on the same level..

    the first subevent will select all and set them to false,

    the second will still reference the touched sprite..

    Thank you very much. You are the GOD!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LittleStain quite curious about your example could it be use multiple time to use for multiple sprite but you only need to select one out of sprite in order of A B C D

    and would it reset the picking order if I were to say touch the Sprite B would be true while A C D would be false and so on ?

    Cause in my game i am having problem getting the sprite to be selected again after the first could i use this string to reset the picking instance ?

  • LittleStain quite curious about your example could it be use multiple time to use for multiple sprite but you only need to select one out of sprite in order of A B C D

    and would it reset the picking order if I were to say touch the Sprite B would be true while A C D would be false and so on ?

    Cause in my game i am having problem getting the sprite to be selected again after the first could i use this string to reset the picking instance ?

    I'm sorry, but I don't understand the question..

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