I'm using Event Scripting and I want to get the Instance that I taped on (with Touch).
I have a condition "On tap gesture on obj_interact". obj_interact is an Object Type with multiple instances, each having it's own Instance Variables that say what dialogue needs to be displayed.
I was able to change the text with
const txt = runtime.objects.Text.getFirstInstance();
txt.text="Test string";
So I know I can alter the text.
I then need to get the clicked Instance's Instance Variables and assign their value to the text. I tried with:
const pickedObj = runtime.object.obj_interact.getFirstPickedInstance();
But it doesn't work. How do I get it?