Hi all,
I am using Nash’s standalone game template for my project. I have followed the new weapon page on the wiki here: https://zdoom.org/wiki/Creating_new_weapons_(ZScript)
I have also added the new weapon to the map and made a DoomEdNum definition. The new weapon shows up in my map correctly but I am not able to pick up the weapon or equip it via the give command. Any ideas what I could be missing? I can upload my .ipk3 if needed.
New weapon help
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
-
- Posts: 1853
- Joined: Sun Jul 21, 2019 8:54 am
Re: New weapon help
Your file will indeed be needed because we can't tell what's wrong without seeing anything.
-
-
- Posts: 1707
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: New weapon help
Ensure that the first frame in your weapon's Ready state references a valid sprite. If the sprite does not exist, the weapon cannot be picked up. (This also applies to the give cheat.)
-
- Posts: 3
- Joined: Thu Jun 13, 2024 8:11 am
- Preferred Pronouns: He/Him
Re: New weapon help
I was able to fix the weapon pick up issue. I had two characters in my sprite names flipped...
I now have a new issue however. I have added a custom sound and I am not sure why it wont play. I have attached my .ipk3
https://www.mediafire.com/file/odgt0ih2 ... e.zip/file

https://www.mediafire.com/file/odgt0ih2 ... e.zip/file
-
-
- Posts: 1707
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: New weapon help
You call A_StartSound("SMGF", CHAN_WEAPON), but in your SNDINFO the logical name of your sound is "sounds/smg/SMGF". You need to use the logical name in A_StartSound instead of the lump name.
-
- Posts: 3
- Joined: Thu Jun 13, 2024 8:11 am
- Preferred Pronouns: He/Him
Re: New weapon help
Ah, I see the issue. I changed the logical name to SMGF and assigned it the path to the file, which got it working. I was thinking SNDINFO needed some special weird assignment syntax. Basically a list of aliases, thanks for the help. 
