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\$
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.

|improve this answer|||||
\$\endgroup\$
  • \$\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 Jan 18 '17 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.