How can I start with a shotgun?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
yum13241
Posts: 227
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

How can I start with a shotgun?

Post by yum13241 »

Self explanatory. I don't care if I have to load Yet Another PK3 or WAD, I want to be able to start with a shotgun. If it's a CVAR, great! If not, that's fine.
Jarewill
Posts: 1331
Joined: Sun Jul 21, 2019 8:54 am

Re: How can I start with a shotgun?

Post by Jarewill »

I don't know of any CVar that does that.

However that's a very easy mod to make with various methods to do it.
You could either redefine the player class to start with a shotgun, create an ENTER ACS script to give the player the shotgun or use a ZScript event handler.

I used the event handler method to spawn a shotgun at the player's location.
Spawning it at the player's location means that gameplay mods will also work with this small mod.
I also added an option to the menu that will make the player instantly start with a shotgun, so they won't have to move a step to get it. That however doesn't work with gameplay mods.
You do not have the required permissions to view the files attached to this post.
yum13241
Posts: 227
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: How can I start with a shotgun?

Post by yum13241 »

Jarewill wrote:I don't know of any CVar that does that.

However that's a very easy mod to make with various methods to do it.
You could either redefine the player class to start with a shotgun, create an ENTER ACS script to give the player the shotgun or use a ZScript event handler.

I used the event handler method to spawn a shotgun at the player's location.
Spawning it at the player's location means that gameplay mods will also work with this small mod.
I also added an option to the menu that will make the player instantly start with a shotgun, so they won't have to move a step to get it. That however doesn't work with gameplay mods.

I'll test it when I'm back at my pc.
yum13241
Posts: 227
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: How can I start with a shotgun?

Post by yum13241 »

Jarewill wrote:I don't know of any CVar that does that.

However that's a very easy mod to make with various methods to do it.
You could either redefine the player class to start with a shotgun, create an ENTER ACS script to give the player the shotgun or use a ZScript event handler.

I used the event handler method to spawn a shotgun at the player's location.
Spawning it at the player's location means that gameplay mods will also work with this small mod.
I also added an option to the menu that will make the player instantly start with a shotgun, so they won't have to move a step to get it. That however doesn't work with gameplay mods.

This works! Thanks!

Return to “General”