The "How do I..." Thread

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.
User avatar
Springy
Posts: 532
Joined: Thu Mar 08, 2012 3:22 am
Location: Earth

Re: The "How do I..." Thread

Post by Springy »

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?
Herculine
Posts: 17
Joined: Fri Jun 18, 2010 8:38 am
Contact:

Re: The "How do I..." Thread

Post by Herculine »

Enjay wrote:[wiki]A_Die[/wiki] ?
*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!

Thank you as well, NeuralStunner. If A_Die doesn't work I will give your code a try next.
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: The "How do I..." Thread

Post by NeuralStunner »

My code uses A_Die. :P 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.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

Re: The "How do I..." Thread

Post by Zombieguy »

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.
Herculine
Posts: 17
Joined: Fri Jun 18, 2010 8:38 am
Contact:

Re: The "How do I..." Thread

Post by Herculine »

NeuralStunner wrote:My code uses A_Die. :P 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.
:D Thanks again. It appears that adding A_Die to the first frame of the death animation has solved the problem.
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: The "How do I..." Thread

Post by Ravick »

@cocka Thanks a lot!
___

But, is there a way to take over just one difficult level from the menu?
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: The "How do I..." Thread

Post by cocka »

I don't really understand what do you mean by "taking it over". But this might help:

http://zdoom.org/wiki/Skill_definition
User avatar
ReedtheStrange
Posts: 226
Joined: Sun Sep 11, 2011 3:27 pm

Re: The "How do I..." Thread

Post by ReedtheStrange »

Is it possible for a monster to have multiple blood colors?
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

Re: The "How do I..." Thread

Post by Zombieguy »

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.
User avatar
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

Post by zrrion the insect »

ReedtheStrange wrote:Is it possible for a monster to have multiple blood colors?
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.

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.
User avatar
BigProjectAlone
Posts: 780
Joined: Wed Mar 21, 2012 5:38 am
Location: canada

Re: The "How do I..." Thread

Post by BigProjectAlone »

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 :)
User avatar
ReedtheStrange
Posts: 226
Joined: Sun Sep 11, 2011 3:27 pm

Re: The "How do I..." Thread

Post by ReedtheStrange »

zrrion the insect wrote:
ReedtheStrange wrote:Is it possible for a monster to have multiple blood colors?
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.

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.
Damn, the decals were actually an important part of it.
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: The "How do I..." Thread

Post by Matt »

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?
BigProjectAlone wrote:how do i put a sound that play when you walk, but don't play when you jump?
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.
User avatar
Ravick
Posts: 2051
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: The "How do I..." Thread

Post by Ravick »

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
Thanks again.
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! :D
User avatar
BigProjectAlone
Posts: 780
Joined: Wed Mar 21, 2012 5:38 am
Location: canada

Re: The "How do I..." Thread

Post by BigProjectAlone »

BigProjectAlone wrote:how do i put a sound that play when you walk, but don't play when you jump?
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]


thanks!!
Locked

Return to “Editing (Archive)”