A question about 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!)
-
- Posts: 2
- Joined: Tue Oct 31, 2017 1:29 am
A question about ammo
Can you have an ammo pickup that gives out 2 ammo types?
-
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: A question about ammo
For this sort of thing, I tend to create a CustomInventory pickup that gives the ammo types in its Pickup state.
Code: Select all
ACTOR DoubleAmmoThing : CustomInventory
{
Inventory.PickupMessage "Two! TWO! Two ammos in one!"
Inventory.PickupSound "pickups/cheesyjingle"
States
{
Spawn:
BPAK A -1
Stop
Pickup:
TNT1 A 0 A_GiveInventory("SomeBeefyAmmoType", 4)
TNT1 A 0 A_GiveInventory("ABunchaLittleBoolits", 50)
Stop
}
}