• 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!

Make a Title Screen + Character Select?

E

Edmen12

Guest
Hello everyone! I am wondering how to create a Title Screen (for an RPG) where after you select Play, you have the ability to create your character. Or rather simply select the race (i.e. Elf, Dwarf, Human, etc.) and then after that select the class (i.e. warrior, paladin, archer, wizard, mage, etc.).

From what I know, you will need different objects for each of these right?

For example would it be like one object is "obj_player_human_warrior" and another is like, "obj_player_elf_mage" and ect. for the different combinations.

Is that a correct assumption to make?

Then after I have created these different obj's and stats / move scripts / attack scripts for each one I'd need to make the menu display "Select Race" and then a "Select Class" and have game maker load each object individually depending on what the player selects.

And after that I'll need to update the room for the obj_view that follows the player to be an if statement right?

So that if the player chooses "obj_human_warrior" then that object will spawn in the room and what not.


So, I just need help with how to create a Menu Screen with an array to select "Play" then "Select Race" and lastly "Select Class" then after those two things are selected I'd need it to load the appropriate objects into the room.

Can anyone help me with this? I'd appreciate it very much if someone could, thanks!
 
A

Aura

Guest
There are two easy approaches that you could go for: First, create different objects for different characters. Second, keep a single object and change the sprites depending on the character chosen.
 

NeoShade

Member
Personally, I'd take Aura's second approach here, otherwise the number of objects you'd need to create could quite easily get out of hand.
 

NightFrost

Member
For visual side of things, a simple approach is to have a variable that tracks the current state of selection process, let's call it for example TitleState. When TitleState equals "Idle" game is waiting for Play button press. When it equals "SelectRace" game is waiting for race selection. When it equals "SelectClass" the game is waiting for class selection. A logical place for the variable would be a titlescreen object, which runs all logic related to that room's actions (I normally have one object for each special room in game, like obj_titlescreen, obj_highscores, obj_settings and so on). You check for the variable's state in the draw event and create clickables on screen accordingly. You set it to "idle" in create event so it starts with displaying a Play button every time the titlescreen room is entered.
 
E

Edmen12

Guest
There are two easy approaches that you could go for: First, create different objects for different characters. Second, keep a single object and change the sprites depending on the character chosen.
For visual side of things, a simple approach is to have a variable that tracks the current state of selection process, let's call it for example TitleState. When TitleState equals "Idle" game is waiting for Play button press. When it equals "SelectRace" game is waiting for race selection. When it equals "SelectClass" the game is waiting for class selection. A logical place for the variable would be a titlescreen object, which runs all logic related to that room's actions (I normally have one object for each special room in game, like obj_titlescreen, obj_highscores, obj_settings and so on). You check for the variable's state in the draw event and create clickables on screen accordingly. You set it to "idle" in create event so it starts with displaying a Play button every time the titlescreen room is entered.
Firstly, I want to thank you both SO much for responding to my help request!
Secondly, I'm still really, really new to game maker and coding / programming. Recently I've been following a tutorial by Heart Beast on youtube on how to make an RPG in gamemaker.

So if there is a page number in the help manual where it speaks directly how to do all this menu stuff, could one of you direct me to that page?
Or, preferably if either one of you are willing to work with me on a more personal level if we could arrange a date / time for a skype screen share and call, that would be fantastic and super helpful too!
 
A

Aura

Guest
The Manual does not teach you how to implement game mechanics sadly. But the second approach I talked about is really simple to implement.

You can set a global variable (declare it in the creation code of character selection room) to a string related to the chosen character. Say if you choose an elf as your character, set it to "Elf".

Now in the Create event of the player object, you can declare some variables to hold sprites related to the chosen character.

Code:
if (global.character == "Elf")
{
    s_walk = spr_elf_walk;
   s_idle = spr_elf_idle;
}
else if (global.character == "Mage")
{
    s_walk = spr_mage_walk;
   s_idle = spr_mage_idle;
}
// ...
Now whenever you need to change your sprite, use those variables.

Code:
sprite_index = s_idle;
I hope that helps! :3
 

Xer0botXer0

Senpai
Whoops I misread,

You can use an array with predefined classes as values, then in character creation use a variable that's incremented or decremented by one every time an arrow is selected, then a submit button will save that variables value to your characters personal properties. or just move onto the next stage.

You can use a switch statement to change what's being loaded onto the screen, changing the value when you've saved your settings and moved onto the next step of character creation.
 
Last edited:
Top