How to get clone name and index on click?

Game Editor comments and discussion.

How to get clone name and index on click?

Postby phyzix5761 » Tue Mar 13, 2012 11:43 am

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!
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: How to get clone name and index on click?

Postby skydereign » Tue Mar 13, 2012 5:43 pm

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).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest