inform 7 guns and gun shooting

how can you make a gun shoot?

Pull the trigger. (sorry!)

Campbell is kidding, of course, but in general you’ll probably find that you’ll get better responses to your questions on this forum if you try out some specific things first and then post a specific question about whatever isn’t working.

In this case, you will need to (a) create a gun, (b) create the shooting action, © write a default for the shooting action (in case the player tries “shoot lamp”), and then (d) write an Instead rule for what happens when the player tries “shoot gun”.

This particular design concept faces an added hurdle, however, in that “shoot lamp” is a perfectly sensible input when the player is holding the gun! The English grammar for “shoot” can branch in two different directions. You will need to work out a way to handle that.

Jim’s advice is good, and suggests a simple general approach. In this specific case, you don’t even need to do that, though, since there’s example code in the documentation that you can just paste right into your code. Example #127, called “Technological Terror,” in the “Combat and Death” section of the Recipe Book makes a gun and a “shoot” verb. I found it by typing “gun” into the Documentation search.

Did you define the action (“Shooting it with is an action applying to two things.”)?

Robert Rothman