How do I despawn objects?

  • long story short, I'm trying to build myself a dress up game (yeah i know)

    i figured out how to make an object spawn where i need it to by clicking on a sprite/icon for said object.

    but i cant seem to figure out how to make the object despawn when clicking the icon a second time?

    Basically i want to be able to select, and unselect, certain clothing items, and have said clothing items despawn when deselected.

    I thought about trying to go a route where the object turns invisible instead, but I feel like thatd just make things cluttered and weird

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is instance picking.

    You can check the how do I FAQ for Construct 2 - construct.net/en/forum/construct-2/how-do-i-18/how-do-i-frequently-asked-ques-41236 - to the category Picking/selecting instance(s) to see different examples of implementation.

    In your project, can there be only a single object/instance for a cloth at the time ?

    If so, you likely will be able to use instance variables to help you "pair" the button you click and the instance of cloth you want to destroy.

    Consider posting your project as it currently stands, explain clearly what you expect it to do, what your code is currently doing and precise steps to reproduce the issue you have.

    This will make it easier to provide an accurate answer in regards to what you have already done.

  • This is instance picking.

    You can check the how do I FAQ for Construct 2 - construct.net/en/forum/construct-2/how-do-i-18/how-do-i-frequently-asked-ques-41236 - to the category Picking/selecting instance(s) to see different examples of implementation.

    In your project, can there be only a single object/instance for a cloth at the time ?

    If so, you likely will be able to use instance variables to help you "pair" the button you click and the instance of cloth you want to destroy.

    Consider posting your project as it currently stands, explain clearly what you expect it to do, what your code is currently doing and precise steps to reproduce the issue you have.

    This will make it easier to provide an accurate answer in regards to what you have already done.

    thank you for the reply, i know itll already be a big help since it gives me the correct direction to go in

    i have a hard time udnerstanding the way somethings are described so i kind of have to guess what does what, but you explained it in a way i get, so i thank you for that!

    its very bare bones right now and full of place holders lol, but i might post it once ive gotten more work done. thank you again. I'll look into instance picking!

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