Help with first person walking animations

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
CanMan
Posts: 15
Joined: Sun Jan 14, 2024 7:17 am
Preferred Pronouns: He/Him
Operating System Version (Optional): windows 11

Help with first person walking animations

Post by CanMan »

tnt1 a 0 a_overlay(-1,"fplegs",false)

fplegs:
FPST A 1 a_overlayoffset (-1,0,70 + pitch-1)
FPST a 0 a_jumpif (momx > 1 momx < -1 momy > 1 || momy < -1,"walk")
loop

walk:
WALK ABCDEFGHIJKLMNO 1
{
a_overlayoffset (-1,0,70 + pitch-1);
A_JumpIf(velx = 0 || vely = 0, "FPLEGS");
}
loop
}

fplegs doesnt appear directly when i put a_overlay and it crashes when trying to walk any help to fix this would be nice
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Help with first person walking animations

Post by Jarewill »

I can only guess without having the project for testing.
I suspect it's because the jumps are done incorrectly.

The first one should likely look like this: A_JumpIf(velx != 0 || vely != 0, "walk")
And the second one should be returned because it's in an anonymous function: Return A_JumpIf(velx == 0 && vely == 0, "fplegs");
Post Reply

Return to “Scripting”