0
\$\begingroup\$

I've got 3 Children in 1 Parent which has "Left pressed" action. I just want to know from which child this action is called.

I try object_index but obviously it returns Parent index.

enter image description here

Thanks in advance.

EDIT #1:
put in Left pressed

with(other) { var id = object_index; }

will return object child which perform this event

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I assume you want to guess what child object is performing the Left Click Event at a given step.

My answer is: instead of returning the object_index, because the parent's one will be returned in this case, return the actual instance id; then, check the object_index of such instance reference.

This way a child's id will be returned, and you can check what object_index such child has.

\$\endgroup\$
1
  • \$\begingroup\$ Nice ! Not really sure it was what you suggest to me but it helps me to find the solution : " with(other) { object_index; } " and this object_index returns the child id which perform event. \$\endgroup\$
    – guish
    Commented Jan 18, 2017 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .