Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
CPLJigsoreQuandary

How to program sprinting animations?

Question

Hello again!

 

For the mod I'm working on I'd like to allow the player to sprint (not "run"), and to disallow the player to autorun. I've been looking at SgtMark's code for Brutal Doom Tactical Mode but there is so much stuff involved in it that it confuses the hell out of me! So would someone be able to point me in the right direction or show me some examples?

 

Basically I want to make my own mod out of Brutal Doom Tactical mode, so what would I have to include in the script?

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

It's not a sprite name definition like crouching, so it's a bit more complicated.  Looking in Membrane, SuperDon apparently set up a variable within the player actor and has it determine whether to use the Walk or Run state definition.  He sets this stuff up from a looping ACS script which looks at the player input and alter's the player actor.

 

I'm not sure he's using the best method here, but I know it works.

Share this post


Link to post
  • 0

So basically I could make it so that the weapon HUD sprinting animations will play as long as the user presses the run button?

 

I saw something called "buttonSpeed" when going through the code in the newest Brutal Doom release, is that the name of the run button by any chance?

 

I just don't know where to even start with this, because I have only made guns before.

Share this post


Link to post
  • 0

You're gonna want to refer to the Wiki a lot, and look at some other mods that do similar things to what you're trying to achieve. That will give you a place to start, and might help you figure out how to do it on your own. Good luck.

Share this post


Link to post
  • 0
Posted (edited)

As far as I know Brutal Doom version 21 is the only mod I have ever seen/heard of with this sprinting effect.

 

Would someone be able to look at it and explain it to me?

 

EDIT: I've been looking for an answer all night, and so far I know that it has to do with using a "fake actor" that is given and taken away from the player's inventory depending on a condition. I believe a similar scenario is used in Weasel's GunLabs tut for the Sniper Rifle (http://gunlabs.blogspot.com/2011/02/tutorial-inventory-variables-and-making.html). However I'm still unsure how I could use it to affect speed and change the animation.

Edited by CPLJigsoreQuandary

Share this post


Link to post
  • 0
Posted (edited)

Membrane has it, and I'm pretty sure it's in the demo.  I think you have to look in MOVEMENT.ACS and PLAYER.DEC.  Like I said, it's something to do with a variable, but I've yet to really pour through and do the overhaul I'd like to, so I don't know the specifics.

 

The fake inventory thing is another possibility, but I would think with ZScript you should be able to streamline it even more, possibly to a simple "if player is running then this instead" type declaration...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×