• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Character/Player Select System

M

MechTurtle

Guest
I'm creating a fighting/brawler type project and I'm trying to wrap my head around a character select system. So far I've implemented a system that associates each Xbox controller a player, but I want each player to be able to select and control a character (ex. player = player one, character = Mario).

Is anyone aware of a character select system that is viable for GameMaker Studio? I understand that this is a basic element of various existing games, but I want a system that provides easiest use and will yield the least amount of bugs.

It would be super helpful if someone could point me in the right direction here or suggest an engine that relates to what I'm looking for.

If you have any ideas on making a system like this please reply!!!
 
U

Uneven Pixel Studios

Guest
So my suggestion would be to use an array. Whenever I use game pads and I want different characters to have different things, arrays are a huge help.
Let's use your example. I want player one to select Mario.
Code:
if gamepad_button_check_pressed(#,gp_face1){
     chara[#] = "Mario"
}
# is the gamepad number

I bet another could explain this better, but that's how I would do it.
 
M

MechTurtle

Guest
Okay thanks!! I think the key thing in your reply is using the gamepad number (#) to select a character. I tried doing this before with normal variables and of course it didn't work, but with arrays I can use numbers to associate characters and controllers. Thanks for the speedy response and I'll see how it works!
 
Top