How to use actors with same graphics?

Non-platform specific questions.

How to use actors with same graphics?

Postby Lacotemale » Tue May 22, 2012 6:13 pm

I want to redo a game which I gave up on a while back and stupidly deleted all the code! :D

So I want to program it better this time. I had 5 individual actors but they all had the same graphics. I wonder can I just create this actor once and use clone. I need to be able to move individual cloned actors without moving all of them.

How can this be done? :)
User avatar
Lacotemale
 
Posts: 285
Joined: Wed Dec 08, 2010 7:47 pm
Location: /home
Score: 7 Give a positive score

Re: How to use actors with same graphics?

Postby skydereign » Tue May 22, 2012 6:20 pm

How were you moving the actors? Using clones and moving with the mouse, you could just have a mouse button down event with drag enabled.
clone_actor -> Mouse Button Down (drag enabled) -> Script Editor
Code: Select all
//

That would allow you to drag around the clone you clicked.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: How to use actors with same graphics?

Postby Lacotemale » Tue May 22, 2012 8:06 pm

I was using the move function in a script. Would that be ok?
User avatar
Lacotemale
 
Posts: 285
Joined: Wed Dec 08, 2010 7:47 pm
Location: /home
Score: 7 Give a positive score

Re: How to use actors with same graphics?

Postby skydereign » Tue May 22, 2012 8:16 pm

If you are unsure if it works, you can always try it out. And by move function do you mean MoveTo? As long as you specify "Event Actor" for the actor (or some other clone specific reference) and as long as the event is clone specific as well it is fine (a keydown event is not clone specific because all actors of that type receive it, while with a mouse event, only one actor is triggered by it).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: How to use actors with same graphics?

Postby Lacotemale » Tue May 22, 2012 8:35 pm

Yes I did mean moveTo, sorry its been a while since I did any GE stuff! :oops:

Yup I will be using the mouse event! :)

Thanks for the help! +1 for you! :wink:
User avatar
Lacotemale
 
Posts: 285
Joined: Wed Dec 08, 2010 7:47 pm
Location: /home
Score: 7 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest