The "How do I..." Thread
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.
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.
Re: The "How do I..." Thread
How do I limit how many weapons a player can carry? I want to be able to make it so players can only carry three different types of weapons at a time. E.g one type of pistol, machine gun and shotgun and allow them to switch that weapon with another one found in game. How would I go about doing this?
Re: The "How do I..." Thread
*facepalm* I searched the Actor Properties, Actor States and Actor Flags pages of the Wiki but I never thought to check the AI functions list. I'm gonna give this a try. Thanks Enjay!Enjay wrote:[wiki]A_Die[/wiki] ?
Thank you as well, NeuralStunner. If A_Die doesn't work I will give your code a try next.
- 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: The "How do I..." Thread
My code uses A_Die.
It demonstrates a failsafe check, the idea is that you can use A_Jump with a small random chance and then make sure it truly dies. I've modified it a little bit for simplicity, now.

Re: The "How do I..." Thread
How would I go about making a custom projectile attack, and upon impact it sticks to actors, walls, etc, and then have the ability to detonate it at will? Basically just like the primary fire for the flailgun, present in DoomStorm.
Re: The "How do I..." Thread
NeuralStunner wrote:My code uses A_Die.It demonstrates a failsafe check, the idea is that you can use A_Jump with a small random chance and then make sure it truly dies. I've modified it a little bit for simplicity, now.

Re: The "How do I..." Thread
@cocka Thanks a lot!
___
But, is there a way to take over just one difficult level from the menu?
___
But, is there a way to take over just one difficult level from the menu?
Re: The "How do I..." Thread
I don't really understand what do you mean by "taking it over". But this might help:
http://zdoom.org/wiki/Skill_definition
http://zdoom.org/wiki/Skill_definition
- ReedtheStrange
- Posts: 226
- Joined: Sun Sep 11, 2011 3:27 pm
Re: The "How do I..." Thread
Is it possible for a monster to have multiple blood colors?
Re: The "How do I..." Thread
I think so. I would probably make multiple blood actors, and then tell ZDoom to spawn all the blood actors in the monster's pain state.
- zrrion the insect
- Posts: 2432
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: The "How do I..." Thread
You could make several coloured blood actors, then have the monsters bloodtype be a random spawner that spawns these blood types. I don't know if you could diversify the blood decals though.ReedtheStrange wrote:Is it possible for a monster to have multiple blood colors?
Is there a way to add a timed delay on inventory items to prevent their usage from overlapping?
I'm using custom inventory items to replicate Build-Engine style one-liners, but I can't seem to prevent the lines from overlapping.
- BigProjectAlone
- Posts: 780
- Joined: Wed Mar 21, 2012 5:38 am
- Location: canada
Re: The "How do I..." Thread
how do i put a sound that play when you walk, but don't play when you jump? and change depending on what you walk on, thanks 

- ReedtheStrange
- Posts: 226
- Joined: Sun Sep 11, 2011 3:27 pm
Re: The "How do I..." Thread
Damn, the decals were actually an important part of it.zrrion the insect wrote:You could make several coloured blood actors, then have the monsters bloodtype be a random spawner that spawns these blood types. I don't know if you could diversify the blood decals though.ReedtheStrange wrote:Is it possible for a monster to have multiple blood colors?
Is there a way to add a timed delay on inventory items to prevent their usage from overlapping?
I'm using custom inventory items to replicate Build-Engine style one-liners, but I can't seem to prevent the lines from overlapping.
- 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: The "How do I..." Thread
When does the blood need to change? I've got a caco that bleeds red, then on death spawns an invisible "meat shield" with blue blood.
If it's got to be during the monster's lifetime, though, maybe add +DONTTRANSLATE to the randomly spawned blood actors?
If it's got to be during the monster's lifetime, though, maybe add +DONTTRANSLATE to the randomly spawned blood actors?
In the actor making the sound, use an A_JumpIf(z-floorz<1,[state]) and put the sound code in that state. Depending on the timing of this you could get the sound to play at the very moment of jumping or not, but once the actor is no longer on the floor they should not be making the sound.BigProjectAlone wrote:how do i put a sound that play when you walk, but don't play when you jump?
Re: The "How do I..." Thread
Thanks again.cocka wrote:I don't really understand what do you mean by "taking it over". But this might help:
http://zdoom.org/wiki/Skill_definition
I'd like to just remove one of the skills, but seems that I'd have to clear all the skills and redefine all the ones except for the one I want to take over.
Well, so be it!

- BigProjectAlone
- Posts: 780
- Joined: Wed Mar 21, 2012 5:38 am
- Location: canada
Re: The "How do I..." Thread
In the actor making the sound, use an A_JumpIf(z-floorz<1,[state]) and put the sound code in that state. Depending on the timing of this you could get the sound to play at the very moment of jumping or not, but once the actor is no longer on the floor they should not be making the sound.[/quote]BigProjectAlone wrote:how do i put a sound that play when you walk, but don't play when you jump?
thanks!!