[Solved] Character Selection Not Working For Only One Player Character

How do I…

I have a player selection screen where players can choose one avatar from four available options. Three avatars work as intended but choosing the fourth one (arine) results in the previous avatar in the event sheet being selected. Here is the event sheet for the two concerned player avatars.


and Kabir

What is happening is that even when i choose the arine avatar, in the gameplay scene, Kabir gets activated. Here’s a screen shot of the Choose Player screen:

All help will be appreciated!

Unfortunately, I don’t think the screen shots you’ve provided are where the problem lies.

It sounds like somewhere in the gameplay scene the CharacterG variable is getting set to “Kabir”.

I double checked, the event sheet isnt explicitly setting the CharacterG variable value to kabir elsewhere.

Ah, my bad. On a closer inspection, I see the problem is in one of the screen shots you provided. The “Kabir Action” and “Game Over Kabir” event groups are not subevents of the “Player Kabir” event group. They’re being run no matter which character is being played.

Drag both event groups across one indentation to the right:

Great, that did the trick! Thanks, i am quite new to gdevelop and inexperienced in the larger game development and programming field. Its a hobby and its great fun, :slight_smile: