Sprinting Script?

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!)
CPLJigsoreQuandary
Posts: 3
Joined: Tue Jun 26, 2018 12:41 am

Sprinting Script?

Post by CPLJigsoreQuandary »

I'm looking through the newest Brutal Doom, trying to see how he was able to make sprinting happen but I am so confused by all of the different parts.

Could someone explain to me in layman's terms how I would have an animation called when the player presses BT_SPEED?

I've tried to make an inventory item called "Sprint" and give it to the player upon start up, and i checked inventory for "Sprint" in an if statement and typed out the frames for the animation I want to use, but that didn't work.

Please don't be like Doomworld and only tell me to look at other mods...I've been doing that...and I know of no mods with sprinting...
User avatar
comet1337
Posts: 876
Joined: Fri Sep 25, 2015 3:48 am
Location: elsewhere

Re: Sprinting Script?

Post by comet1337 »

Code: Select all

a_jumpif(getplayerinput(input_buttons) & bt_speed, "sprint")
put that in the 'ready' state and add a 'sprint' state
CPLJigsoreQuandary
Posts: 3
Joined: Tue Jun 26, 2018 12:41 am

Re: Sprinting Script?

Post by CPLJigsoreQuandary »

Thank you! I knew it was going to end up being simpler than I thought.

Return to “Scripting”