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.

Jumping Sprites???

Postby cherry_poptartz » Wed May 19, 2021 5:45 am

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.
User avatar
cherry_poptartz
 
Joined: 19 Apr 2021
Discord: Cherry Poptartzzz#9867

Re: Jumping Sprites???

Postby Jarewill » Wed May 19, 2021 6:48 am

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.
Jarewill
 
 
 
Joined: 21 Jul 2019


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests