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 BlueFireZ88 » Sat Feb 25, 2012 6:41 pm

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.
User avatar
BlueFireZ88
Fight fire with BlueFire.
 
Joined: 18 Jan 2011
Location: Erebus Station

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

Postby Zombieguy » Sat Feb 25, 2012 7:05 pm

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

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

Postby Zombieguy » Sun Feb 26, 2012 4:28 pm

Does anyone know how to add a custom ricochet sound on death state/xdeath state for bullet puffs?
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby Enjay » Sun Feb 26, 2012 4:35 pm

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

Classes:BulletPuff

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.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Zombieguy » Sun Feb 26, 2012 8:25 pm

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

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

Postby Blue Shadow » Sun Feb 26, 2012 11:32 pm

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
Blue Shadow
 
Joined: 14 Nov 2010

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

Postby Enjay » Mon Feb 27, 2012 12:48 pm

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.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Zombieguy » Mon Feb 27, 2012 2:26 pm

Enjay, you, are a DECORATE god. ;)
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby Enjay » Mon Feb 27, 2012 3:37 pm

No, I have just learned a few tricks from those who are. ;)
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Zombieguy » Tue Feb 28, 2012 6:44 pm

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

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

Postby NeuralStunner » Tue Feb 28, 2012 6:58 pm

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

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

Postby Zombieguy » Tue Feb 28, 2012 7:16 pm

Could you give me an example of the 0-tic frame trick, please?
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

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

Postby NeuralStunner » Tue Feb 28, 2012 7:35 pm

Code: Select allExpand view
TNT1 A 0
That's all.

... By the way, do NOT use "NULL". TNT1 is there for exactly that purpose.
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby Zombieguy » Tue Feb 28, 2012 8:02 pm

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

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

Postby ChronoSeth » Tue Feb 28, 2012 10:23 pm

Code: Select allExpand view
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.
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

PreviousNext

Return to Editing

Who is online

Users browsing this forum: BlazingPhoenix, Google Feedfetcher and 1 guest