Stupid n00b with a question.

I’m trying to make a gun with one shot in it. I pulled the code for the gun itself from the example on making an item that breaks when shot and that works fine, but I can’t seem to find any instruction on how to limit ammo or break the gun when shot (either one will work since it is only meant to be fired once). Can anyone point me in the right direction?

Sure. I suppose you have created an action called ‘shooting’, or something like that? A clean implementation would look something like this:

[code]The gun is either loaded or unloaded. The gun is loaded.

Before shooting the gun:
if the gun is loaded, say “You have no ammo left!” instead.

After shooting the gun:
now the gun is unloaded.[/code]

I think that should work.

Awesome. Thank you.

Before shooting the gun:
   if the gun is loaded, say "You have no ammo left!" instead.

Shouldn’t that be unloaded?

Yes, it should. :blush: