How do I find the ID of an instance being overlapped by another object?

0 favourites
  • 4 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • First time using the forum lol, a bit of a noob

    Simply, I have (any) number of instances of an object in the layout, and when my character (another object) overlaps an instance, I want that instance to do things such as: change animations, add to a global variable, and activate behaviors.

    My question is how do I achieve this? At the moment it only happens once, the player overlaps an instance and the instance lights up, but then it will not do it again with any other instance.

    I simply want every instance that is touched to activate the same way.

    Wondering if I can get the ID of the instance being overlapped and then pick it by that ID.

    Tagged:

  • Is the behaviour 'run constantly while it is overlapping' or more like an on hit one time behaviour. It sounds like you've used trigger once so instead you can try 'player on collision with instance'. That should work well enough for a one time hit and you can print the instance UID in the action when the collision takes place.

  • There are many ways you can pull this, most easy way is by assigning the instance variable. This way you can pick and differentiate the instances of the same object, and give your desired action individually.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you so much lionz! it works perfectly now just by changing that one condition.

    i still don't quite understand why it works for 'On Collision' but not for 'Object is Overlapping.. Trigger once' since I thought they worked the same way but I suppose I'm silly lol

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