A question about ammo

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

A question about ammo

Postby gabgabgab » Thu Dec 21, 2017 12:40 am

Can you have an ammo pickup that gives out 2 ammo types?
User avatar
gabgabgab
 
Joined: 31 Oct 2017

Re: A question about ammo

Postby wildweasel » Thu Dec 21, 2017 12:48 am

For this sort of thing, I tend to create a CustomInventory pickup that gives the ammo types in its Pickup state.
Code: Select allExpand view
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
   }
}
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: A question about ammo

Postby gabgabgab » Thu Dec 21, 2017 1:05 am

Thanks
User avatar
gabgabgab
 
Joined: 31 Oct 2017


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests