Why don't my crouch sprites work?
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.
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.
- PaganRaven
- Posts: 439
- Joined: Fri Oct 14, 2005 2:21 pm
Why don't my crouch sprites work?
I set the crouch sprite in decorate to Player.CrouchSprite "SINC" and added the sprites to match it, but when I crouch it still just shrinks the Y-axis 
- ChronoSeth
- Posts: 1631
- Joined: Mon Jul 05, 2010 2:04 pm
- Location: British Columbia
Re: Why don't my crouch sprites work?
Post your code.
- PaganRaven
- Posts: 439
- Joined: Fri Oct 14, 2005 2:21 pm
Re: Why don't my crouch sprites work?
I pretty much told you the code with that one line, but if you want the whole player class, here it is:
I can tell you the sprite names are spelled correctly, and I'm (pretty) sure I added a replacement for all the frames.
Code: Select all
ACTOR AdultFemaleAkhetPlayer : AkhetPlayer
{
player.displayname Sine
player.CrouchSprite "SINC"
Player.WeaponSlot 1, FemaleAkhetFist
Player.WeaponSlot 2, FemaleHekaFlamethrower, FemaleHekaRocket
Player.WeaponSlot 3, FemaleHekaBeam, FemaleAirStrike, FemaleAquaShot
Player.WeaponSlot 4, FemaleHeksplosion
Player.WeaponSlot 5, BowofNit, HamsterRevolver, HamsterRevolverDual, ScarabLauncher, KittenCannon, MaceOfMarduk, WhipOfGeser, AxeOfChaac, BuzzBlaster, BuzzBlasterDual, BuzzBlasterSuper
Player.StartItem "RaceAkhet"
Player.StartItem "GenderFemale"
Player.StartItem "GodStage1"
Player.morphweapon "FemaleHekaRocket"
Player.StartItem "FemaleHekaRocket"
Player.StartItem "FemaleAkhetFist"
Player.StartItem "FemaleHekaFlamethrower"
Player.StartItem "GodAmmo", 256
Player.StartItem "BlueAnkh", 1
Player.StartItem "HerosLightSpell", 1
Player.StartItem "SlowCurseSpell", 1
Player.StartItem "StatusNormal", 1
damagefactor "teotl", 2.56
damagefactor "ether", 0.64
-DONTMORPH
States
{
Spawn:
AAAA A 0 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) > 0,"Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) < 0,"Fall")
AAAA A 0 A_TakeInventory("StatusChild",1)
AAAA A 0 A_TakeInventory("StatusGiant",1)
AAAA A 0 A_TakeInventory("StatusDead",1)
SIN0 A 1
Loop
See:
AAAA A 0 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) > 0,"Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) < 0,"Fall")
SIN0 B 4
AAAA A 0 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) > 0,"Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) < 0,"Fall")
SIN0 C 4
AAAA A 0 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) > 0,"Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) < 0,"Fall")
SIN0 D 4
AAAA A 0 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) > 0,"Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) < 0,"Fall")
SIN0 E 4
Loop
Jump:
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) < 0,"Fall")
SIN0 H 1 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(waterlevel > 0, "Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) == 0,"See")
AAAA A 0 A_CustomMissile ("Walljumpcheck", 0, 0, 0, 2, 0)
goto Spawn
Fall:
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) > 0,"Jump")
SIN0 I 1 A_JumpIf(waterlevel == 3, "submerged")
AAAA A 0 A_JumpIf(waterlevel > 0, "Jump")
AAAA A 0 A_JumpIf(ACS_ExecuteWithResult(358,0,0,0) == 0,"See")
AAAA A 0 A_CustomMissile ("Walljumpcheck", 0, 0, 0, 2, 0)
goto Spawn
submerged:
SIN0 L 8 A_JumpIf(waterlevel < 3, "Jump")
SIN0 M 8 A_JumpIf(waterlevel < 3, "Jump")
SIN0 N 8 A_JumpIf(waterlevel < 3, "Jump")
SIN0 O 8 A_JumpIf(waterlevel < 3, "Jump")
goto Spawn
Missile:
SIN0 F 12
Goto Spawn
Melee:
SIN0 G 6 BRIGHT
Goto Missile
restore:
AAAA G 0 SetPlayerProperty(0,0,4)
AAAA A 0 A_TakeInventory("StatusSleep",1)
AAAA A 0 A_TakeInventory("StatusFrozen",1)
AAAA G 0 ACS_EXECUTEALWAYS(345,0,0,0,0)
goto Spawn
Pain:
AAAA G 0 SetPlayerProperty(0,0,4)
AAAA A 0 A_TakeInventory("StatusSleep",1)
AAAA A 0 A_TakeInventory("StatusFrozen",1)
AAAA G 0 ACS_EXECUTEALWAYS(345,0,0,0,0)
SIN0 P 4 A_Pain
Goto Spawn
Pain.stun:
AAAA A 0 HealThing(1)
SIN0 P 4 SetPlayerProperty(0,1,4)
Goto Pain.stun2
Pain.stun2:
AAAA A 0 A_Jump(16,2)
SIN0 P 4
loop
HON0 A 0 SetPlayerProperty(0,0,4)
Goto restore
pain.sleep:
AAAA A 0 SetPlayerProperty(0,1,4)
AAAA A 0 A_GiveInventory("StatusSleep",1)
AAAA A 0 ACS_EXECUTEALWAYS(343,0,0,0,0)
AAAA A 0 HealThing(1)
pain.sleep2:
AAAA A 0 A_Jump(8,5)
AAAA A 0 A_JumpIfInventory("StatusSleep",1,2)
AAAA A 0
goto restore
SIN0 J 12
SIN0 K 12
loop
SIN0 A 0 A_TakeInventory("StatusSleep",1)
goto restore
pain.ice:
SIN0 P 4 A_Jump(4,"pain.freeze")
AAAA K 0 A_JumpIfInventory("StatusFrozen",1,"pain.freeze")
goto restore
pain.freeze:
AAAA A 0 A_GiveInventory("StatusFrozen",1)
AAAA A 0 SetPlayerProperty(0,1,4)
AAAA A 0 ACS_EXECUTEALWAYS(344,0,128,192,255)
pain.freeze2:
AAAA A 0 A_Jump(8,4)
AAAA A 0 A_JumpIfInventory("StatusFrozen",1,2)
AAAA A 0
goto restore
SIN0 Q 16
loop
AAAA A 0 A_TakeInventory("StatusFrozen",1)
goto restore
unfreeze:
AAAA A 0 SetPlayerProperty(0,0,4)
AAAA A 0 A_TakeInventory("StatusFrozen",1)
AAAA A 0 ACS_EXECUTEALWAYS(345,0,0,0,0)
goto restore
pain.petrify:
AAAA A 0 SetPlayerProperty(0,1,4)
AAAA A 0 HealThing(1)
pain.petrify2:
SIN0 R 16
loop
pain.slow:
AAAA A 0 HealThing(1)
AAAA A 0 ACS_EXECUTEALWAYS(346,0,0,0,0)
goto see
pain.p45:
AAAA A 0 HealThing(1)
AAAA A 0 A_GiveInventory("StatusP45",1)
goto see
Death:
AAAA A 0 A_TakeInventory("StatusChild",1)
AAAA A 0 A_TakeInventory("StatusSleep",1)
AAAA A 0 A_TakeInventory("StatusFrozen",1)
AAAA A 0 A_TakeInventory("StatusP45",1)
AAAA A 0 A_TakeInventory("StatusGiant",1)
AAAA A 0 A_TakeInventory("StatusMarble",1)
AAAA A 0 A_TakeInventory("StatusTiny",1)
AAAA A 0 A_TakeInventory("StatusGodmode",1)
AAAA A 0 A_TakeInventory("StatusInvisible",1)
AAAA A 0 A_TakeInventory("StatusStone",1)
AAAA A 0 A_TakeInventory("StatusFast",1)
AAAA A 0 A_TakeInventory("StatusSlow",1)
AAAA A 0 A_GiveInventory("StatusDead",1)
HON0 K 5 A_PlayerSkinCheck("AltSkinDeath")
HON0 K 5 A_PlayerScream
DEAD A 3 A_NoBlocking
DEAD B 3
DEAD C 3
DEAD D 3
DEAD E 3
PANS A 3
PANS B 3
PANS C 3
PANS D 3
PANS E -1
Stop
}
}- PaganRaven
- Posts: 439
- Joined: Fri Oct 14, 2005 2:21 pm
Re: Why don't my crouch sprites work?
I've been at this for a while, experimenting with the way doomguy's crouch sprites are set up and such. It definately has something to do with the way the standing sprites should align with the crouching sprites, but I haven't pinpointed the exact problem.
See, right now I only made the forward facing frames for the crouch, so the sprite names end with 0 instead of 1-8. I tried copying and pasting to add the other frames of rotation in. When I get doomguy's standing sprites to use that crouch sprite, it works, but when I try to use the standing sprites from the player class it's intended for, it just shrinks the Y-axis again. When I take out the 7 other frames of rotation and have the sprite names end with 0, doomguy shrinks his y-axis, too. Also, I started remaking sprites for my player class so I only have the front frames for it, which could be the problem and I may need to add the other rotations.
edit: doesn't work. s'pht! Why is this so hateful? It doesn't seem to work unless the playerclass is set up to rigidly have 4 frames of animation.
edit 2: Actually, no, the See state has to have it's animations defined on one line, like chase BCDE, instead of each frame split across multiple lines. Why is it like this? I also noticed it always makes one of the frame offsets go way down on the y-axis in one of the crouch frames, even though the offset isn't like that in the pk3.
See, right now I only made the forward facing frames for the crouch, so the sprite names end with 0 instead of 1-8. I tried copying and pasting to add the other frames of rotation in. When I get doomguy's standing sprites to use that crouch sprite, it works, but when I try to use the standing sprites from the player class it's intended for, it just shrinks the Y-axis again. When I take out the 7 other frames of rotation and have the sprite names end with 0, doomguy shrinks his y-axis, too. Also, I started remaking sprites for my player class so I only have the front frames for it, which could be the problem and I may need to add the other rotations.
edit: doesn't work. s'pht! Why is this so hateful? It doesn't seem to work unless the playerclass is set up to rigidly have 4 frames of animation.
edit 2: Actually, no, the See state has to have it's animations defined on one line, like chase BCDE, instead of each frame split across multiple lines. Why is it like this? I also noticed it always makes one of the frame offsets go way down on the y-axis in one of the crouch frames, even though the offset isn't like that in the pk3.
- PaganRaven
- Posts: 439
- Joined: Fri Oct 14, 2005 2:21 pm
Re: Why don't my crouch sprites work?
Okay guys, I figured it out.
In your player class (if you modified it), you have to BE SURE that ALL the frames in it's states have the same 4-letter name (i.e., using PLAYXX, all your frames must begin with PLAY). This is likely because it's the only way it knows how to translate it into the crouch sprite properly.
So if there's ever anybody who gets confused by this, I have put my findings here, and maybe I'll sign up to the wiki (if I haven't already. I think I have... some five odd years ago) and add this critical info to the crouching wiki page.
In your player class (if you modified it), you have to BE SURE that ALL the frames in it's states have the same 4-letter name (i.e., using PLAYXX, all your frames must begin with PLAY). This is likely because it's the only way it knows how to translate it into the crouch sprite properly.
So if there's ever anybody who gets confused by this, I have put my findings here, and maybe I'll sign up to the wiki (if I haven't already. I think I have... some five odd years ago) and add this critical info to the crouching wiki page.
Re: Why don't my crouch sprites work?
you need to use s_skin, the it will work, skins ignore decorate
- 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: Why don't my crouch sprites work?
One doesn't need to do any such thing.
-
KPu3uC B Poccuu
- Posts: 36
- Joined: Sun May 22, 2011 9:51 pm
- Location: Russia
Re: Why don't my crouch sprites work?
So if I want to use crouching sprites, all standing ones must be named in the same pattern? Well shit, that requires a lot of sprite renaming in my developing mod.
Re: Why don't my crouch sprites work?
Basically. This is unavoidable because of the way crouch sprites work, since there needs to be a crouched "copy" of every standard sprite since the player can crouch during any phase of animation. It's sorta like a built-in skin.
-
KPu3uC B Poccuu
- Posts: 36
- Joined: Sun May 22, 2011 9:51 pm
- Location: Russia
Re: Why don't my crouch sprites work?
But there the 29 letters limit for sprite name arise then. I definetely can't just rename all to one pattern because I haven't so much letters. Well, why ZDoom still limit sprite name length to 4 characters??? This is why I liked more Edge.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Why don't my crouch sprites work?
No, not all. Sprites that don't have a crouch equivalent can be named differently.KPu3uC B Poccuu wrote:So if I want to use crouching sprites, all standing ones must be named in the same pattern? Well shit, that requires a lot of sprite renaming in my developing mod.
But since there can't be any crouch states for technical reasons there is no decent way to specify this and a global second set of sprites is the only option.
