Jumping Sprites???

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze 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.
User avatar
cherry_poptartz
Posts: 3
Joined: Mon Apr 19, 2021 11:05 am

Jumping Sprites???

Post by cherry_poptartz »

Is there any way to have the players sprite change when they jump??? Like how Player.CrouchSprite defines the sprite when the player crouches?? Its very glaring visually when I jump in my project when the player is just thrusted in the air with no visual movement. I've searched the wiki for a while, including jumping, and I see no way to define sprites for jumping or anything similar so if anyone can help me with this I'd greatly appreciate it.
Jarewill
Posts: 1445
Joined: Sun Jul 21, 2019 8:54 am

Re: Jumping Sprites???

Post by Jarewill »

You could do a velocity check and jump to specific states.
It's not perfect, but that's the best thing I can think of.

Here's an example in ZScript:
Spoiler:
Note that you don't need to rewrite your player class if you are doing it in DECORATE.
You just need to make your class inherit from this ZScript one and you will be able to use the function in DECORATE.
Just delete the example states as they might mess with something.

Return to “Assets (and other stuff)”