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
BlueFireZ88
Posts: 1087
Joined: Tue Jan 18, 2011 9:04 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Tallon IV
Contact:

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

Post by BlueFireZ88 »

Thanks Blue Shadow.

And Zombieguy:

I've seen a few wads that implement those kind of features with seperate Actors.

A few examples I can name:
Z86's Particle Enhancement Wad
Beautiful Doom
Brutal Doom

It should have the coding you need to refer to to give you an idea on how those actors are constructed.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Thanks, man. I found the coding for the wall-chunks in Brutal Doom. Now, for those fancy bullet effects.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Does anyone know how to add a custom ricochet sound on death state/xdeath state for bullet puffs?
User avatar
Enjay
 
 
Posts: 27072
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

The wiki page for them actually tells you which sounds it will play for which events.

[wiki]Classes:BulletPuff[/wiki]

Personally, I prefer redefining the actor and playing a sound in the appropriate state using a code pointer to play the sound but the built in system works well enough.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Thanks, Enjay. I have another question:
When I spawn in the first map while loading my custom pk3 file, in the upper left corner, it says: "p_startscript: unknown script 292" and then fades away. It's not a big deal, but it's annoying. How do I fix this?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

That means that the engine is trying to run a script that doesn't exist, which in this case it's script #292.
User avatar
Enjay
 
 
Posts: 27072
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

Yes, so presumably you have a decorate item or another script or a line or something set to run that script. ZDoom is receiving the instruction but the script does not exist in the BEHAVIOR for the level so you get the error message. So, you will have to track down what is trying to run the script and fix that.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Enjay, you, are a DECORATE god. ;)
User avatar
Enjay
 
 
Posts: 27072
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

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

Post by Enjay »

No, I have just learned a few tricks from those who are. ;)
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

I have an issue. The BulletPuff plays its sound, except for its XDeath state sound. And the SawPuff, dosn't play its sound, it just plays the BulletPuff's ricochet sound. And the FistPuff doesn't play any sound at all. Any help on how to add custom BulletPuff sounds, and get the BulletPuff to enter its XDeath state? Code -

Code: Select all

Actor NewBulletPuff : BulletPuff replaces BulletPuff
{
  +ALLOWPARTICLES
  -DONTSPLASH
  -EXPLODEONWATER
  Mass 1
  Radius 1
  Height 1
  RenderStyle Add
  Alpha 0.9
  VSpeed 0
  Scale 0.08
  States
  {
  Spawn:
	 TNT1 A 1 bright Light("BulletPuffLight1")
     TNT1 A 1 bright Light("BulletPuffLight2") A_FadeOut(0.2)
  Death:
     TNT1 A 0 A_custommissile("TinyWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_custommissile("BigWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_custommissile("HugeWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_custommissile("TinyWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_SpawnItem("PlasmaSmoke")
	 TNT1 A 1 bright Light("BulletPuffLight1")
     TNT1 A 1 bright Light("BulletPuffLight2") A_FadeOut(0.2)
	 TNT1 B 0 A_PlaySound("ricochet")
	 Stop
  XDeath:
  TNT1 A 0 A_PlaySound("hitflesh")
  Stop
  }
}


Actor FistPuff : NewBulletPuff
{
  States
  {
  Crash:
    //NULL A 0
	NULL A 0 A_SpawnItem("SmallSmoke")
	NULL A 0 A_PlaySound("weapons/fist/punch")
	//NULL A 25
	stop
  Spawn:
  Melee:
    //NULL A 0
    NULL A 0 A_PlaySound("weapons/fist/punch")
	//NULL A 25
	stop
  }
}

Actor SawPuff : NewBulletPuff
{
  DamageType Saw
  States
  {
  Crash:
    NULL A 0
	NULL A 0 A_SpawnItem("SmallSmoke")
	//NULL AA 0 A_SpawnDebris("Sparky")
	NULL A 0 A_PlaySound("weapons/chainsaw/hitwall")
    BPUF ABCD 1 bright Light("BulletPuffLight1")
	BPUF ABCD 1 bright Light("BulletPuffLight2") A_FadeOut(0.2)
	NULL A 5
	Stop
  Spawn:
  Melee:
    NULL A 0
	NULL A 0 A_PlaySound("weapons/chainsaw/hitwall")
	NULL A 25
    Stop
  }
}
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 »

Put an empty, 0-tic frame at the beginning of every state.

The engine never processes functions in the first frame of an actor's existence.

Note: Despite what the Wiki implies, new puff actors do not have to inherit from BulletPuff.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

Could you give me an example of the 0-tic frame trick, please?
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 »

Code: Select all

TNT1 A 0
That's all.

... By the way, do NOT use "NULL". TNT1 is there for exactly that purpose.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

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

Post by Zombieguy »

NeuralStunner wrote:Put an empty, 0-tic frame at the beginning of every state.
Wait, at the beginning of which states? I put a 0-tic frame on every line, and it didn't work.

EDIT: Why don't you just take my code I posted, and show me exactly how you want me to do it? Just to make it easier.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

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

Post by ChronoSeth »

Code: Select all

Actor NewBulletPuff : BulletPuff replaces BulletPuff
{
  +ALLOWPARTICLES
  -DONTSPLASH
  -EXPLODEONWATER
  Mass 1
  Radius 1
  Height 1
  RenderStyle Add
  Alpha 0.9
  VSpeed 0
  Scale 0.08
  States
  {
  Spawn:
TNT1 A 0
	 TNT1 A 1 bright Light("BulletPuffLight1")
     TNT1 A 1 bright Light("BulletPuffLight2") A_FadeOut(0.2)
  Death:
TNT1 A 0
     TNT1 A 0 A_custommissile("TinyWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_custommissile("BigWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_custommissile("HugeWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_custommissile("TinyWallChunk",0,0,random(0,360),2,random(-20,80))
     TNT1 A 0 A_SpawnItem("PlasmaSmoke")
	 TNT1 A 1 bright Light("BulletPuffLight1")
     TNT1 A 1 bright Light("BulletPuffLight2") A_FadeOut(0.2)
	 TNT1 B 0 A_PlaySound("ricochet")
	 Stop
  XDeath:
TNT1 A 0
  TNT1 A 0 A_PlaySound("hitflesh")
  Stop
  }
}
Just the one actor, but it should give the right idea.
Locked

Return to “Editing (Archive)”