Assign special ammo to special weapons

Users who are viewing this thread

I've made some ranged weapons (firearms) and I'm wondering how I can make 1 weapon to only use a special ammo?

For example:

M-16 = 5.56
Beretta = 9mm
Shotgun = Shells
Etc.

Do I have to make new weapon categories? I've seen some mods that use this system so I know it's possible.
The question is; how?
 
Well, I have ideas that are not tested.  There is a trigger used by the firearms that is part of the item tuple.  Look at the pistol, the trigger is to show the smoke particles after firing.

My idea is to check for the specific ammo in their inventory.  if its there take away from it's volume.

The issue with this is it will still fire if there is no ammo.  Also, how to make it check before firing.  Just a starting idea.
 
I have this same issue with my star wars mod.  Using native functionality you can really only have three types of ranged weapon ammo (arrows, bolts, bullets).  So you can use bows & crossbows for different guns, but otherwise that is it.  If you want more you'd have to do scripting like jik mentioned.

Rather than decreasing an item quantity you could also have a global variable with the clip size, in the code example Keedo420 posted below he has a global variable $g_uses2 that he decreases every time the weapon is fired.
http://forums.taleworlds.com/index.php/topic,57113.msg1476649.html#msg1476649
 
Thanks for the tip.

Unforunatley it's to complicated for me to understand. My skills in MS is very limited.
However... I could just add "Ammo". And make it show up as a box in the inventory and as a bullet when fired.

To bad the other things was out of my reach. But I'll live with the box  :grin:
 
Back
Top Bottom