Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
jukenukem

ZDoom and GZDoom crash when player dies due to DECORATE I made. Plz halp.

Recommended Posts

Yo.

I replaced the Hell Knight with a Hell Knight that shoots multiple times instead of just once when it attacks. But this somehow crashes ZDoom and GZDoom.

actor HellKnightLol : HellKnight replaces HellKnight
{
spawnid 113
obituary "%o was splayed by a Hell Knight."
hitobituary "%o was gutted by a Hell Knight."
health 150
-BOSSDEATH
radius 24
height 64
mass 1000
speed 13
painchance 50
seesound "knight/sight"
painsound "knight/pain"
deathsound "knight/death"
activesound "knight/active"
MONSTER
+FLOORCLIP
states
{
Spawn:
BOS2 AB 10 A_Look
loop
See:
BOS2 AABBCCDD 3 A_Chase
loop
Melee:
Missile:
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_BruisAttack // See BaronBall
BOS2 EF 2 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 2 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 1 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 1 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
goto See
Pain:
BOS2 H 2
BOS2 H 2 A_Pain
goto See
Death:
BOS2 I 8
BOS2 J 8 A_Scream
BOS2 K 8
BOS2 L 8 A_NoBlocking
BOS2 MN 8
BOS2 O -1 A_BossDeath
stop
Raise:
BOS2 ONMLKJI 8
goto See
}
}

Plz halp.

Share this post


Link to post

What's the point of inheriting from the Hell Knight just to duplicate all it's data?

actor HellKnightIdiot : HellKnight replaces HellKnight
{
states
{
Melee:
Missile:
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_BruisAttack // See BaronBall
BOS2 EF 2 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 2 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 1 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 1 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
goto See
}
}

Share this post


Link to post

Uh-oh... actually, that part works. The problem is, I made a... "super-pistol"... And it crashes when you die!

Here's my new DECORATE.txt file:

actor HellKnightIdiot : HellKnight replaces HellKnight
{
health 150
speed 13
states
{
Melee:
Missile:
BOS2 EF 8 A_FaceTarget
BOS2 G 8 A_BruisAttack // See BaronBall
BOS2 EF 2 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 2 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 1 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
BOS2 EF 1 A_FaceTarget
BOS2 G 1 A_BruisAttack // See BaronBall
goto See
}
}


actor Pistol : DoomWeapon 5010 //The definition as of the development of Skulltag.
{
Game Doom
Weapon.SelectionOrder 1900
Weapon.AmmoUse 1
Weapon.AmmoGive 20
Weapon.AmmoType "Clip"
Obituary "$OB_MPPISTOL" // "%o was tickled by %k's pea shooter."
+WEAPON.WIMPY_WEAPON
Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED" // "Picked up a pistol."
States
{
Ready:
PISG A 1 A_WeaponReady
Loop
Deselect:
PISG A 0 A_Lower
Loop
Select:
PISG A 1 A_Raise
Loop
Fire:
PISG A 4
PISG B 0 A_FireBullets (2, 0, 1, 20, "BulletPuff")
PISG B 0 A_PlaySound("weapons/rocklx", CHAN_WEAPON)
PISG B 6 A_GunFlash

PISG C 10
PISG B 7 A_ReFire
Goto Ready
Flash:
PISF A 7 Bright A_Light1
Goto LightDone
PISF A 7 Bright A_Light0
Goto LightDone
Spawn:
PIST A -1
Stop
}
}

Share this post


Link to post

Why do you copy the entire actor's code? Just make an actor that inherits from the first, with only the necessary changes, and that's all. If the decorate code for existing actors is given on the wiki, it's as reference and example, not for the purpose of being copied. What's the point? It's standard data. You don't need to give it to ZDoom, it's already in ZDoom.

So derive your actor from the existing ones, but stop copy/pasting from the wiki! That's not how you're supposed to do anything!

And never give your actors a name that already exists. Your pistol is named pistol, this creates a name conflict. Don't do that. It's a big source of problems and may lead to crash when loading saves, as the engine can be confused on which "pistol" you have, since two different actor classes have this name.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×