Hey guys!
I've made a replacement set of sprites for the Doom Fist, and what I would like to achieve sounds simple. Basically, I'd like to have no hands on screen when the player is idle, but when the player moves I'd like to loop through my animation so you can see the hands move. When the player runs I want the animation to move faster, which if I can get the walking part down, its as simple as using lower tic amounts.
Is there a way to check if a player is walking, and then go to a certain state and use that animation? Maybe a way to check if the player is idle and then do no animation?
Change state when player walks or runs?
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!)
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!)
-
- Posts: 387
- Joined: Fri Mar 03, 2017 9:53 am
- Graphics Processor: nVidia (Modern GZDoom)
-
- Posts: 1605
- Joined: Mon Jun 12, 2017 12:57 am
Re: Change state when player walks or runs?
Look into project msx.
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: Change state when player walks or runs?
Would this work?
Spoiler:forwardmove and sidemove are integers so you can check to see if they're above or below a certain value, or set your frame duration as a multiple of that integer.
-
- Posts: 387
- Joined: Fri Mar 03, 2017 9:53 am
- Graphics Processor: nVidia (Modern GZDoom)
Re: Change state when player walks or runs?
Sounds useful. Let me make sure I follow this correctly:Matt wrote:Would this work?Spoiler:forwardmove and sidemove are integers so you can check to see if they're above or below a certain value, or set your frame duration as a multiple of that integer.
Checks to see if the player is on the ground and if the player is moving forward or to the side. If so, then do whatever right? Does this have to get placed into an ACS script that I can load in DECORATE? I apologize for being a noob; I want to learn just not sure exactly how to go about using this.
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: Change state when player walks or runs?
It's ZScript, but an ACS equivalent should be possible with GetPlayerInput and GetActor(Floor)Z.
-
- Posts: 387
- Joined: Fri Mar 03, 2017 9:53 am
- Graphics Processor: nVidia (Modern GZDoom)
Re: Change state when player walks or runs?
OK, I will play around with some ideas and post back if I truly get stumped lol. Thanks for the help.