Giving accessories a chance to not consume ammo

Stranza

Official Terrarian
How do you make accessories give a chance to not consume ammo when using a weapon, I get an error when I use the ConsumeAmmo hook that is in the Example gun script from ExampleMod.

- Thank you for your help!
 
Here you are:

player.ammoCost75 = true; // 25% chance to not consume ammo
player.ammoCost80 = true; // 20% chance to not consume ammo

Other things about this:

player.ammoBox = true; // Ammo Box buff (20% chance to not consume ammo)
player.ammoPotion = true; // Ammo Potion buff (I forgot what it's do)

I think I help you!
 
Here you are:

player.ammoCost75 = true; // 25% chance to not consume ammo
player.ammoCost80 = true; // 20% chance to not consume ammo

Other things about this:

player.ammoBox = true; // Ammo Box buff (20% chance to not consume ammo)
player.ammoPotion = true; // Ammo Potion buff (I forgot what it's do)

I think I help you!
The player.ammoBox = true; worked, but not the player.ammoCost80 = true;, thank you regardless I just needed the ammo reduction.
 
Back
Top Bottom