Page 1 of 1

Making a gun that requires no ammo

Posted: Tue Jul 01, 2025 6:18 am
by Fishbus
Heya,

I want to make a weapon, or gun. something I can attach to say, a vehicle. I do not need ammo in any way, and I can just fire it without any cost.

e.g. I want to make a gun that only "action = ..." is to just make a noise when I press fire.

Is there such a way? I feel like since turrets can do it (e.g. a worm is a turret with infinite spitting ammo) that a gun should be able to.

Cheers!

Re: Making a gun that requires no ammo

Posted: Wed Jul 02, 2025 7:36 am
by Natha
What have you achieved so far?

Re: Making a gun that requires no ammo

Posted: Wed Jul 02, 2025 4:39 pm
by Fishbus
Natha wrote: Wed Jul 02, 2025 7:36 am What have you achieved so far?
All I've been able to get is making a new weapon, attach it to the car, but it still requires ammo in some capacity it seems.

Code: Select all

 ammo_type =
      {
        source_type = "default",
        category = "gun-noise",
        target_type = "position",
        clamp_position = true,
		 action =
        {
          type = "direct",
          action_delivery =
          {
            -- do nothing
          }
        }
      },
So right now i'm at a loss.

Re: Making a gun that requires no ammo

Posted: Wed Jul 02, 2025 5:05 pm
by Silari
Far as I'm aware it's not possible to make a gun that doesn't require ammo - presumably because some portions of it's attack is based on the ammo used.

You can make one that doesn't CONSUME ammo by setting the attack_parameters.ammo_consumption_modifier to 0. It still needs ammo in the gun but won't actually use any of it up when it fires.

Re: Making a gun that requires no ammo

Posted: Wed Jul 02, 2025 5:58 pm
by Fishbus
Silari wrote: Wed Jul 02, 2025 5:05 pm Far as I'm aware it's not possible to make a gun that doesn't require ammo - presumably because some portions of it's attack is based on the ammo used.

You can make one that doesn't CONSUME ammo by setting the attack_parameters.ammo_consumption_modifier to 0. It still needs ammo in the gun but won't actually use any of it up when it fires.
I say boo to not being able to have no-ammo it seems like something that could have been possible.