Re: Linking Entities
Posted: Tue Sep 26, 2023 3:26 pm
It might have been better to provide this picture from the start.
From your description it was not possible for me to glean that you're trying to create a graphical level editor.
On your button, you could add a field for the ID of the target entity and a field for the function name. When the button is pressed, you can look up the target entity via the ID as suggested by pgimeno. And then you can simply call the function via entity[functionname](). Not elegant imo because there's no typo protection and such but should work and looks like the lowest effort solution if you don't want to build more UI for your level editor.
From your description it was not possible for me to glean that you're trying to create a graphical level editor.
On your button, you could add a field for the ID of the target entity and a field for the function name. When the button is pressed, you can look up the target entity via the ID as suggested by pgimeno. And then you can simply call the function via entity[functionname](). Not elegant imo because there's no typo protection and such but should work and looks like the lowest effort solution if you don't want to build more UI for your level editor.