I’ve been trying to search for this but it’s been difficult to find anything about it.
I’d like to make devices such as buttons, levers, traps, etc. that trigger other generic devices, which may have very different effects from each other and do different things.
I made a rough implementation with groups and ids, I can reliably add interactable objects to a group and trigger a single action on objects in another group, by finding the right ones through an ID and then applying an action, like in the screenshot.
I made a slightly different variation of this to only activate when a specific keycard is in the inventory but the problem remains: in the end the event chain can only do one kind of action at a time and I would have to repeat a lot of events if I want the action to be different, like deleting an object, or moving some object, or anything else really.
I’ve been wondering if I can do better, I’ve been getting into custom extensions and I’ve been trying to make something that can work like this but the limitations in what objects can be picked is making this pretty hard, I can’t call behavior functions on a group object, I can’t tell something to just “do your thing” like I could in classical programming languages.
What’s the gdevelop approach to do something like this?