Cloning

Talk about making games.

Cloning

Postby Dark RyNo » Tue Feb 15, 2005 7:33 pm

Is there any way to clone an actor and then make it different without changing the original?
I need my character to gain an action and i dont want to have to redo all the events he has.
Dark RyNo
 
Posts: 35
Joined: Tue Feb 08, 2005 7:04 pm
Score: 0 Give a positive score

Postby jazz_e_bob » Tue Feb 15, 2005 9:00 pm

:lol:

The age old question.

At present, there is no way to copy an actor.

You must create a new one and copy all the events/actions/scripts by hand.

Note:

If your actors are being created at runtime you could use an actor variable "myType" to assign it a behaviour. You could then program a generic "enemy" and choose its type when created. It's all very tricky though and not to be attempted by the faint hearted. :(
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby Dark RyNo » Wed Feb 16, 2005 11:58 am

Damn.
This is gonna take a while.

Wait!
Could I change his animation and then say, if animation=anim2 then create actor(bullet)
Dark RyNo
 
Posts: 35
Joined: Tue Feb 08, 2005 7:04 pm
Score: 0 Give a positive score

Postby jazz_e_bob » Wed Feb 16, 2005 4:07 pm

Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby Dark RyNo » Thu Feb 17, 2005 8:46 pm

Fixed!
I got around this by making a variable.
You can only do this action if the variable is 1.
It starts at 0.
When you pick up the powerup it changes to 1.
Along with your animation changes and stuff.
My game is getting good now.
well, good for a n00b with only 9 days of game making.
Dark RyNo
 
Posts: 35
Joined: Tue Feb 08, 2005 7:04 pm
Score: 0 Give a positive score

Postby jazz_e_bob » Thu Feb 17, 2005 8:58 pm

Well done mate!

8)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby IPete2 » Sat Mar 05, 2005 8:51 pm

Okay Dark,

nice one, but when can we see a demo??

IPete2.
IPete2
 
Posts: 43
Joined: Sun Jan 30, 2005 4:06 pm
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest