How can I start with a shotgun?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

How can I start with a shotgun?

Postby yum13241 » Sat May 22, 2021 3:00 pm

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.
yum13241
 
Joined: 10 May 2021
Discord: yum13241#8226
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: How can I start with a shotgun?

Postby Jarewill » Sat May 22, 2021 3:15 pm

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.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: How can I start with a shotgun?

Postby yum13241 » Sat May 22, 2021 3:28 pm

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
 
Joined: 10 May 2021
Discord: yum13241#8226
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: How can I start with a shotgun?

Postby yum13241 » Sat May 22, 2021 4:31 pm

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!
yum13241
 
Joined: 10 May 2021
Discord: yum13241#8226
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests