Destroy an object and everything pinned to it without con...

0 favourites
  • 6 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Can I destroy an object and everything pinned to it without a container?

    I tried using pinnedUID but the documentation is very confusing to me.

    Why did I still need instance variable if there is pinned UID? Why did I need pinned UID when I can just save UID right after the object was created and pinned. What is pinned UID for exactly and how to use it?

    Thank you

  • Maybe you can do like this :

    for each "sprite2" is overlapping "sprite" ~> destroy

  • Maybe you can do like this :

    for each "sprite2" is overlapping "sprite" ~> destroy

    That will destroy all sprite2 overlapping with sprite1. Besides, it don't need for loop to do the same thing.

    I want to create UI. Let say bar, close button, panel, etc pinned to one window title. And when the window title destroyed, every items pinned to that will also destroyed, but I don't use container because there will be many kind of UI using the same asset to save filesize and event (it's free edition :v).

    Thanks for the answer.

    this is my capx file

    dropbox.com/s/mh072xom9h198 ... .capx?dl=0

    EDIT:

    Hey but that gives me an idea.

    It works but It still feels weird though

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > Maybe you can do like this :

    > for each "sprite2" is overlapping "sprite" ~> destroy

    >

    That will destroy all sprite2 overlapping with sprite1. Besides, it don't need for loop to do the same thing.

    I want to create UI. Let say bar, close button, panel, etc pinned to one window title. And when the window title destroyed, every items pinned to that will also destroyed, but I don't use container because there will be many kind of UI using the same asset to save filesize and event.

    Thanks for the answer.

    this is my capx file

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

    I use IID to fix this bug . because "sprite" and "sprite2" created in the same time . so they have same IID .

  • >

    > > Maybe you can do like this :

    > > for each "sprite2" is overlapping "sprite" ~> destroy

    > >

    >

    > That will destroy all sprite2 overlapping with sprite1. Besides, it don't need for loop to do the same thing.

    >

    > I want to create UI. Let say bar, close button, panel, etc pinned to one window title. And when the window title destroyed, every items pinned to that will also destroyed, but I don't use container because there will be many kind of UI using the same asset to save filesize and event.

    > Thanks for the answer.

    >

    > this is my capx file

    > dropbox.com/s/mh072xom9h198 ... .capx?dl=0

    >

    I use IID to fix this bug . because "sprite" and "sprite2" created in the same time . so they have same IID .

    Woooooooo. Thank you!

    It worked <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> I don't know what it is for before.

  • Put all Pin-nable sprites inside a family: ALL_PINNABLE

    Give the family an Global Var: PIN_UID

    On Pin | Set ALL_PINNABLE.PIN_UID to [Sprite.UID]

    On Sprite Destroyed |

    Pick ALL_PINNABLE where ALL_PINNABLE.PIN_UID = Sprite.UID | Destroy ALL_PINNABLE

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