0 Favourites

How do I 'Sprite' overlapping Sprite with specific UID?

  • How do I 'Sprite' overlapping Sprite with specific UID?

    I want to use the overlapping function. But it needs to be specific to a Spriests UID, as there are multiple copies of said Sprite.

    How do I do this...

    Explain in simple terms... Thanks

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Do not use UID to do such a thing (my opinion).

    Mark a Sprite with an instance variable, or an instance boolean.

    So.

    Give Sprite an instance boolean 'Marked'. (in the layout, in its properties)

    Make 'Marked' true for that very specific Sprite. (in the layout, in its properties)

    Then: When we want to -- by example -- want to change the animation frame of the marked sprite when it is overlapping another instance of that sprite :

    + Sprite: Is overlapping Sprite

    ----+ System: For each Sprite

    --------+ Sprite: Is Marked

    ---------> Sprite: Set animation frame to 1

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

    ---------> Sprite: Set animation frame to 0

    + System: Else

    -> Sprite: Set animation frame to 0

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