00:00
00:00
Newgrounds Background Image Theme

Falkon0re just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

double characters in a platformer

414 Views | 4 Replies
New Topic Respond to this Topic

double characters in a platformer 2014-10-03 06:56:31


how do i make a character hidden if the other character is selected. and the other character can still do what the other character can do? how will i name them, do i need to name them the same name. urgently needs your replies.


I don't have formal education about flash game development. all i know is the product of my self-study alone. so, kindly help me.

Response to double characters in a platformer 2014-10-03 11:22:53


At 10/3/14 06:56 AM, halfblue3 wrote: how do i make a character hidden if the other character is selected. and the other character can still do what the other character can do? how will i name them, do i need to name them the same name. urgently needs your replies.

I assume by this you mean that you can choose one of two characters and their only difference being their appearance.

I also assume you're working on the timeline.

If this is the case, instead of creating two lots of code for each character, you could have a boolean or intiger to decide which character has been selected and use if statements for the code to act accordingly.

Response to double characters in a platformer 2014-10-03 13:39:07


Using instance names is pretty a inflexible system for reasons like this. But if it's really urgent what you could do is swap the names when the other player is selected. Two objects cannot have the same instance name, if you try it, it will likely ignore one of them completely.


If ya have something to say, PM me. I have a lot of time to spare.

Also never PM egg82.

BBS Signature

Response to double characters in a platformer 2014-10-03 15:15:45


At 10/3/14 06:56 AM, halfblue3 wrote: how do i make a character hidden if the other character is selected. and the other character can still do what the other character can do? how will i name them, do i need to name them the same name. urgently needs your replies.

There's a way i would do this, but I'm not sure you would understand. Perhaps for the needs you mentioned so far, all you would need is two different characters on two different frames of the same movie clip. You could reference them by their two different instance names. You'll have to make them movie clips, too.

If there is more to what you want, let us know so we can better help you. It's a little vague right now and I'm sure there's more.

Response to double characters in a platformer 2014-10-03 23:03:20


all the replies are really helpful. thanks for all those who helped.

i've tried to put the two mc's in the frame, hiding the boy if the girl is selected and vice versa. it worked. but i learned that the vcam just follows the first char i have named char(boy character). the other is named char1(girl character).

i've added a code to the vcam that if the girl is selected, vcam follows the girl not the boy character but it still doesn't work. i know to myself that my logic is correct but why it doesn't work. also, i used a _global variable as container if the girl or boy is selected because it is 2 more frame away from where the validation is needed. is it alright?

how to make them move? is it like _root.char.boy.gotoAndStop("walkRight"), or is there other ways?

again, urgently needs your replies.


I don't have formal education about flash game development. all i know is the product of my self-study alone. so, kindly help me.