Detect the ID of the sprite being overlapped?

0 favourites
  • 3 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Hi :)

    I can't see an obvious way to detect the ID of a Sprite object that is being overlapped by another. I was wondering if anyone knows how to do this/if I'm missing something? Thanks!

    Through this I am hoping to create a 'Marker' system.

    I currently have a level with many platform sprites at different heights, i want a marker sprite to spawn over the platform at the point where a user clicks. By knowing the ID of this platform I'll be able to access it's co-ordinates (specifically it's Y co-ordinate) and therefore, combined with the X co-ordinate of the users click location, spawn said marker.

    Just thought I'd clarify my intentions in case someone can think of a better way of doing this!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your descriptions don't really match each other. This sample picks the object you click on, and spawns a new sprite at the X coordinate of the mouse, but the Y coordinate of the clicked object.


    Hopefully something in here helps.

  • You can use a local global variable named pickedUID. Then, condition: on marker collision with platform, action: pickedUID=platform.UID If I get you right.

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