[solved]How do I make a weapon that can spawn ammo?
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!)
- Z0mbieMinecraft
- Posts: 8
- Joined: Wed Mar 25, 2020 8:31 pm
- Location: Knee Deep in the Dead
[solved]How do I make a weapon that can spawn ammo?
Hello everyone. This is another question regarding custom weapon making for my weapon mod that I am producing. I am wanting to know how to make a weapon that can spawn ammo types, as I want to make a weapon that can lob a custom ammo type as a non damaging projectile that I can pick up. I will greatly appreciate it if someone helps. If this isn't possible, then is there a way to make a weapon that gives ammo when you fire it?
Last edited by Z0mbieMinecraft on Fri May 01, 2020 1:31 pm, edited 1 time in total.
Re: How do I make a weapon that can spawn ammo?
For throwing ammo A_SpawnItemEx with forward velocity, for giving ammo to the player A_GiveInventory.
For example, this shotgun will fire shells:
For example, this shotgun will fire shells:
Spoiler:Edit: Forgot about player's pitch.