Character Select Menu? A little help for someone brand new to gdevelop

Hello! I am making my first ever game in gdevelop. I wanted to surprise some friends of mine by using some of their ocs from a comic we all happen to enjoy and making a platformer out of it! I’ve already made all the art, it’s just the implementation that’s tripping me up.

For the most part, I am simply replacing all of the preincluded art and music from the Not-A-Vania example game by silver-streak with my own illustrations, and building additional mazes for the player to explore. For the most part, this has been going very smoothly, along with other features I’ve toyed with. There are only a couple of issues that I can’t seem to figure out, but would probably be pretty obvious to someone more familiar with this software!

I wanted to make a character select screen so that before the game begins, the player can choose which character they’d like to send through the mazes. I’ve tried following some different tutorials, but to no avail. If someone wouldn’t mind looking at the bare Not-A-Vania example game and helping me sort out what changes to the events/code I need to make to make this possible? (Here: [Example] An Advanced Platformer Example - Not-A-Vania Redux)

My only other issue is adding more buttons to the home screen of the game to connect to some other scenes I’ve built. I’ve tried copying and pasting links and changing the destination, but I can’t figure out how to get the selection bar to hover over it (with the keypad controls) like the other links.

Otherwise, I pretty much have my own first ever game made! It’s just that I’m stuck on these two details.

here. this might help

I did watch this, but it didn’t seem to work with the template of the example game. I’ll give it one more try and then see if there’s any particular part that doesn’t work. Thank you though!

1 Like

Okay - so (and I’ll give this a try when I go home) it seems that the key issue is that the not-a-vania template refers to the PC hero object so many times (all of the actions/events refer to it so specifically) that making a new object for every character would be insanely time consuming, since I’d have to effectively recreate a lot of events for each object. I think it may be easier to nest all of the different character skins under one object (?) and then change the animations depending on what scene the character is in, having each scene correspond to a different character? I’m unsure whether this would be a viable solution, bit I’ll give it a shot to see if this solves the issue.

Make the Player object the collision cube

oh that should work!!! before i spend um. too much time trying to figure out how to do that (apologizing newbie sounds) could you let me know real quickly how to do that?

If you want I could help you make the conversion, just give me the game files and how many different characters there are

As the author of Not-A-Vania, it is currently designed as an advanced example replicating Castlevania 1 or Super Castlevania. With this in mind, you’re not going to easily replace the hero character, but what you might be able to do is change the finite state machine (FSM).

Keep the main hero character object as is. Add additional animations for each “other” character you want, and add a global variable of “SelectedCharacter”.

Then you go into each external event sheet for the state machine, and find any instances where it changes the animations. You’ll need to make subevents that have conditions that checks the value of the SelectedCharacter variable. Then you just select the appropriate animation for that hero.

e.g. Let’s say you have 3 different characters:

  1. The SelectedCharacter variable would be 0, 1, or 2.
  2. Add animations for every possible state to the existing hero object that share the same names, but are suffixed with a number (you don’t need to suffix for 0 as it’s already the default, e.g. Idle1, Idle2, etc)
  3. In the “Idle” state event sheet, you need to rework the first event in the action section. You’d add another condition of “The global variable “SelectedCharacter” = 0” to the conditions IN ADDITION AND ABOVE to the existing condition in the box.
  4. You could copy and paste that entire event again, but make it so the next event is “The global variable “SelectedCharacter” = 1”, and change the other condition to "The animation of Hero is “Idle1” from just Idle. Then you’d’ update the action on that event to the Idle1 animation instead of just Idle.

You’ll need to do this for every state (therefore every HeroFSM sprite sheet) for the hero’s FSM.

You can then use that global variable as a trigger for anything else you might do for the character.

You’ll probably need to set up events at the start of the scene that change the player’s HP/Damage/etc to whatever values you want, if each playable character has different attributes.

Edit: As a heads up, if you’re brand new to GDevelop, this example is not really designed for your scenario. As mentioned in all of the comments in the example itself, you’re expect to thoroughly know and understand the basics of FSMs in Gdevelop, the different types of variables, external events, etc etc. It is listed as an advanced example for those reasons. However, if you feel confident enough about it, the above is how I would go with adding multiple characters to the existing example.


Awesome! Thank you so much, this makes a lot of sense. Perhaps this was a more tricky example to start with than I thought it’d be (probably just overconfidence since i figured i could figure this out quickly) but this seems like a totally manageable solution! thank you!

1 Like

thank you so kindly, but i think i’ve got it from here now :slight_smile:

No worries at all on this! The example I built is explicitly to help people become more familiar with the concepts, but having a base understanding of the concepts already will set you up for more success.

I hope the above method helps!

I think this should work! I’ve followed the steps you’ve given me and from what I can tell by looking at the events (from what i know about coding anyways) that this is quite close to working! Exciting too, since I feel like this could make a good template just for me to be able to build off of more in the future. :slight_smile:

Still I think I’ve done something a little bit wrong in regards to following your solution - I’ve added the global variable and added it as a condition to every animation in the finite machine events, (this has all been a great way for me to learn about fsms btw!!!) but still, after the player changes the value of the global variable (i assume), the animation doesn’t change from Idle to Idle1 (I’m only attempting the one, so far). I think I’ve got most everything down, but there must be a small step I’ve missed along the way that keeps this from working?

If someone wouldn’t mind taking a peek, here are a few of the game files (I took out most of the bulk, like most of the other stages/mazes, so everything should be more visible):

Again, apologies if the fix is simple :pray: but once I have this set up, I’ll be able to import the rest of my assets/mazes/levels etc and finish this game for my friends quickly from this point!

I can’t grab the files right now, but can you show a screenshot of your global variables, and then the Idle State machine’s action section?

Ah - never mind! I solved it right after I sent my message. :smiley: You know, you figure it out on your own just right after you ask for more help lol

But it works perfectly now! Thank you so much. I’ll easily be able to complete my game from here.

1 Like