The Daily Click ::. Forums ::. Klik Coding Help ::. MMF2 Chracter selection.
 

Post Reply  Post Oekaki 
 

Posted By Message

Garb



Registered
  09/08/2010
Points
  10
10th August, 2010 at 03:33:49 -

ok, i want to make it so you can Select different characters in a platformer game, and use that specific character
through out the hole game, multiple frames and such. but i am not sure how to do this, i really cant figure it out,
any ideas?

 
--------------
<br />
Meeply Team
<br />
-
<br />
Grapple Games

Yami



Registered
  23/12/2003
Points
  608
10th August, 2010 at 09:06:59 -

First you need to have each character movement within a group.
Say you have 2 characters, character_A and character_B

Well in group1 character_A is the one you're using so just make character_B always invisible.
In group2 you're using character_B so make character_A always invisible.

Then create a counter and make a code like this.

(This is for character_A which is group1.)
Counter=0 Activate group1 and deactivate group2

(This is for character_B which is group2.)
Counter=1 Activate group2 and deactivate group1

Now when you select a character just have the number 0 or 1 saved under an ini file. And at the start of the frame you have the counter set to and load that ini file.


So here's a summary. You have each character movement in a group. Depending on what the counter is set to depends on what character you're using and which groups are activated and deactivated. When you select a character it saves that number and at the beginning of the frame you set the counter to load that saved number.

 
Image

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
10th August, 2010 at 14:29:14 -

you could use a global value instead. That might be simpler than ini

 
n/a

Garb



Registered
  09/08/2010
Points
  10
10th August, 2010 at 14:31:09 -

Thanks, but are there any visual tutorials? im quite basic with MMF2 and im not sure about most of this, thanks.

 
--------------
<br />
Meeply Team
<br />
-
<br />
Grapple Games

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
11th August, 2010 at 14:37:32 -

for simplicity you could have one active object that has your movement events attached to it (usually called a mask), then have all of your seperate characters as other objects that follow that mask object based on a value. It could be a counter, it could be an alterable value or it could be a global value. I would suggest a global value.

then, all you'll need are events in the event editor to make each player object follow the first one.

global value 0 = 0 ----> player 1 follow 'mask'
global value 0 = 1 ----> player 2 follow 'mask'
global value 0 = 2 ----> player 3 follow 'mask'

etc.

 
.

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
11th August, 2010 at 23:29:11 -

http://www.mediafire.com/?i7zv37o7zl6fci8
heres a basic example of the character selection

 
n/a

tetsuya_shino



Registered
  12/08/2004
Points
  491
12th August, 2010 at 00:02:23 -


Originally Posted by AndyUK
for simplicity you could have one active object that has your movement events attached to it (usually called a mask), then have all of your seperate characters as other objects that follow that mask object based on a value. It could be a counter, it could be an alterable value or it could be a global value. I would suggest a global value.

then, all you'll need are events in the event editor to make each player object follow the first one.

global value 0 = 0 ----> player 1 follow 'mask'
global value 0 = 1 ----> player 2 follow 'mask'
global value 0 = 2 ----> player 3 follow 'mask'

etc.



I use this style in my current project and it works really well. You could also go even further and set the mask to walk slower, or jump higher depending on what character you are. =]

 
n/a

hall



Registered
  18/08/2010
Points
  19
19th August, 2010 at 05:51:32 -


Originally Posted by AndyUK
for simplicity you could have one active object that has your movement events attached to it (usually called a mask), then have all of your seperate characters as other objects that follow that mask object based on a value. It could be a counter, it could be an alterable value or it could be a global value. I would suggest a global value.

then, all you'll need are events in the event editor to make each player object follow the first one.

global value 0 = 0 ----> player 1 follow 'mask'
global value 0 = 1 ----> player 2 follow 'mask'
global value 0 = 2 ----> player 3 follow 'mask'

etc.



im having problem with the activation thing on the game part. i set the global values but how do i activate cause it wont let me

 
n/a

Yai7

Peace & Love

Registered
  28/01/2002
Points
  3197

19th August, 2010 at 09:12:38 -

That's what I did in another bubble girl's series.
There are several elemental powers and for each of them I use a different object, but that is so simple since you just destroy one and create one instead without life or energy lost.

Basically, they are all grouped under the same group so when I choose fire girl for example, I terminate the group character and create fire girl in her place. Simple!

 
(=
   

Post Reply



 



Advertisement

Worth A Click