Creating custom ammo

C++ Got ya down? Half-Life 2 Coding Related.
Post Reply
Brainjuice
Pixel
Posts: 1
Joined: Thu Feb 28, 2013 8:45 pm

Creating custom ammo

Post by Brainjuice » Thu Feb 28, 2013 9:55 pm

Well I created a custom weapon but I don't want to tell the weapon to use smg1 or ar2 as "primary_ammo". I want to create a custom ammo type with its own model and other things like the maximum amount of ammo you can carry. Is there an easy way to do this?

User avatar
Maestro Fénix
Team Member
Team Member
Posts: 2457
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Creating custom ammo

Post by Maestro Fénix » Fri Mar 01, 2013 10:50 am

Yes.

http://wiki.obsidianconflict.net/?title ... ed_Weapons

http://wiki.obsidianconflict.net/?title ... stom_Ammos

On your scripted weapon, on primary_ammo (or secundary_ammo), put the name of the custom ammo.

In Hammer, use the item_custom entity to put your custom ammo on the map. You can indicate the model you want, the ammo, and the amount.
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos


Image

Post Reply