How to reference any object within extension?

I am making an extension, and within it, a behaviour. I would like the object that the behaviour is attached to to have collision with an other object that is referenced e.g. in the behaviour settings; or the collidable object has a separate behaviour attached.

To put it simply:
Can an external object be referenced in an extension by any means?

Here is a screenshot of the context:


(The topic in question is the action I highlighted)

I’ve wondered about this for awhile. I never got it to work. The easiest way seems to be to call a function from the scene with the object as a parameter. The event would need to run on every frame or at least when needed.

Behaviors like the platform and pathfinder use 2 behaviors. They use a manager to create a list of objects. I don’t understand the manager part.

See this thread.
https://forum.gdevelop.io/t/behaviors-and-behavors/61519?u=keith_1357

1 Like