Jump to content

Ammo with delta values?


DarkSlayerEX

Recommended Posts

I was wondering if anyone had figured out how to make an item act as delta'd ammo, draining it's delta values on use. Also, I was wondering if there is a way to make a recipe that checks an item's remaining delta value, and compensates for it.

 

 

I'm not sure if the pistol clips function in that way though, as I've never used one.

 

 

I'd tried using the following code, and added it's ID to the bow's acceptable ammo list, however it didn't work.

	item ArrowQuiver	{		Weight	=	0,		AlwaysWelcomeGift	=	TRUE,		Type	=	Drainable,            UseDelta	=	0.02,		DisplayName	=	Arrow Quiver,		Icon	=	null,	}
Link to comment
Share on other sites

Ah it is not that easy you see. It will require some more or less extensive lua to make the ammo drainable. I'm working on making "drinks" drainables and I had to write a custom function for drinking.

I guess it would be the same for the ammo. Not sure what files you would have to change to make it work though.

Link to comment
Share on other sites

You might look at the Xmod codebase (see the WIP forum).  I have two weapons which have completely different ammo schemes.  One is the SilverPistol which hooks into the ReloadManager, and the other is the SUPRGun - which is solar powered and so has its own ammo based on ModData for the item.  If you are doing a bow and arrow type thing, the former might be what you want ... the latter is more for a weapon which doesn't have a normal source of ammo (like arrows and bullets).

 

As RoboMat said though - hooking into ReloadManager is non-trivial and requires Lua effort, though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...