Page 141 of 972
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 11:18 am
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?
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 11:24 am
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.
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 11:32 am
by NeuralStunner
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
Posted: Mon Jun 18, 2012 11:40 am
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.
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 11:45 am
by Herculine
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.

Thanks again. It appears that adding A_Die to the first frame of the death animation has solved the problem.
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 1:32 pm
by Ravick
@cocka Thanks a lot!
___
But, is there a way to take over just one difficult level from the menu?
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 4:08 pm
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
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 5:49 pm
by ReedtheStrange
Is it possible for a monster to have multiple blood colors?
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 6:03 pm
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.
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 8:15 pm
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.
Re: The "How do I..." Thread
Posted: Mon Jun 18, 2012 9:14 pm
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

Re: The "How do I..." Thread
Posted: Tue Jun 19, 2012 2:00 am
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.
Re: The "How do I..." Thread
Posted: Tue Jun 19, 2012 11:12 am
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.
Re: The "How do I..." Thread
Posted: Tue Jun 19, 2012 9:41 pm
by Ravick
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!

Re: The "How do I..." Thread
Posted: Wed Jun 20, 2012 3:53 am
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!!