The "How do I..." Thread

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

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

Postby Springy » Mon Jun 18, 2012 12:18 pm

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?
User avatar
Springy
BLASPHEMER!
 
Joined: 08 Mar 2012
Location: Earth

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

Postby Herculine » Mon Jun 18, 2012 12:24 pm

Enjay wrote:A_Die ?

*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.
Herculine
 
Joined: 18 Jun 2010

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

Postby NeuralStunner » Mon Jun 18, 2012 12:32 pm

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.
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby Zombieguy » Mon Jun 18, 2012 12:40 pm

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.
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby Herculine » Mon Jun 18, 2012 12:45 pm

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.
Herculine
 
Joined: 18 Jun 2010

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

Postby Ravick » Mon Jun 18, 2012 2:32 pm

@cocka Thanks a lot!
___

But, is there a way to take over just one difficult level from the menu?
User avatar
Ravick
Do what thou wilt, since you don't bug the hell out of me!
 
Joined: 22 Aug 2010
Location: Tubarão, Brasil

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

Postby cocka » Mon Jun 18, 2012 5:08 pm

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
cocka
 
Joined: 02 Jul 2011
Location: Hungary

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

Postby ReedtheStrange » Mon Jun 18, 2012 6:49 pm

Is it possible for a monster to have multiple blood colors?
User avatar
ReedtheStrange
 
Joined: 11 Sep 2011

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

Postby Zombieguy » Mon Jun 18, 2012 7:03 pm

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.
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby zrrion the insect » Mon Jun 18, 2012 9:15 pm

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
zrrion the insect
Good, bad, I'm the guy with the pun.
 
Joined: 25 Jun 2009
Location: Deep in sector-overlap hell.

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

Postby BigProjectAlone » Mon Jun 18, 2012 10:14 pm

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
BigProjectAlone
Not even death, can save you from me.
 
Joined: 21 Mar 2012
Location: canada

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

Postby ReedtheStrange » Tue Jun 19, 2012 3:00 am

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
ReedtheStrange
 
Joined: 11 Sep 2011

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

Postby Vaecrius » Tue Jun 19, 2012 12:12 pm

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
Vaecrius
Team Bad Allocation, blast off at the speed of light!
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

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

Postby Ravick » Tue Jun 19, 2012 10:41 pm

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
Ravick
Do what thou wilt, since you don't bug the hell out of me!
 
Joined: 22 Aug 2010
Location: Tubarão, Brasil

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

Postby BigProjectAlone » Wed Jun 20, 2012 4:53 am

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!!
User avatar
BigProjectAlone
Not even death, can save you from me.
 
Joined: 21 Mar 2012
Location: canada

PreviousNext

Return to Editing

Who is online

Users browsing this forum: MeatyD and 1 guest