Change player's class through menu in ZScript

Moderator: GZDoom Developers

Post Reply
User avatar
DrPyspy
Posts: 278
Joined: Sat Feb 21, 2015 7:35 pm
Operating System Version (Optional): Windows XP Gangster Edition
Location: Utah, USA

Change player's class through menu in ZScript

Post by DrPyspy »

Image

So basically, I have a menu here that I want to be the class selection menu. I have the new game button directing the player to this menu, and after the option is selected, it proceeds to the unmodified episode menu. However, the menu currently does not have any effect on the player, as there is no way to set the player's class as far as I know.

I would like to request a feature where I can access whatever sets the player's class before the game starts, wherever that may be. It would be extremely helpful and make my current class system a lot more manageable.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Change player's class through menu in ZScript

Post by Graf Zahl »

What you need to do is to pass the selected player class index as 'param' to the SetMenu function when starting the episode menu. That's how the internal menu also does it.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”