How to get clone name and index on click?
Posted:
Tue Mar 13, 2012 11:43 am
by phyzix5761
I want to be able to click on an actor and capture the name and index number. How am I able to do that?
Thanks!
Re: How to get clone name and index on click?
Posted:
Tue Mar 13, 2012 5:43 pm
by skydereign
Well since you mentioned click, you would normally use a mouse button down event (problem is you have to give it to every actor you can do that with). The other way would be to use getactor to retrieve the top actor's Actor*. Problem is this won't work if you were using any invisible or other actor above the xy coordinate you specify. This becomes a problem if you were using a mouse button down event in a cursor (still using xmouse, ymouse as the position).