Jump to content
  • 0

How to program sprinting animations?


CPLJigsoreQuandary

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

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

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...

Edited by RockstarRaccoon

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...