Stop player from firing

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
RobertR
Posts: 18
Joined: Wed Dec 09, 2009 7:41 pm

Stop player from firing

Post by RobertR »

I'd like to have a level where the player can't fire at monsters. Is there an easy way to disable the player's ability to fire weapons (including the first/chainsaw)?

My original (less ideal) solution was to make the monsters invulnerable, but I need the monsters to attack Hate Targets and using the -SHOOTABLE option in DECORATE prevents this from working.

Any suggestions much appreciated, cheers.
User avatar
Doomfreak
Posts: 55
Joined: Fri Oct 03, 2008 9:17 am
Location: Espoo,Finland

Re: Stop player from firing

Post by Doomfreak »

You can put to the map's ACS to give a inventory which prevents the weapon from firing.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Re: Stop player from firing

Post by Apothem »

You could take all the ammo in the player's inventory and then give it back when your done.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Stop player from firing

Post by ChronoSeth »

If you intend for it to be the only map in the mod, you could modify the player class in Decorate to remove the starting weapons and not place any others in the map. You could also use Decorate to replace all of the weapons with dummy actors.

(of course, that won't work if you want the player to still have weapons)
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Stop player from firing

Post by Matt »

If it's not important that the player still be able to select weapons during that time, you can temporarily give the player a weapon that doesn't do anything that they can't switch out of, then remove it and set the player's weapon to whatever it was before once you're done.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Stop player from firing

Post by NeuralStunner »

Vaecrius wrote:If it's not important that the player still be able to select weapons during that time, you can temporarily give the player a weapon that doesn't do anything that they can't switch out of, then remove it and set the player's weapon to whatever it was before once you're done.
In other words, morphing? :P
Locked

Return to “Editing (Archive)”