Kavawuvi

Sprinting

59 posts in this topic

Is there any way that the sprint key can be changed eg. Q key ? I have players complaining that they keep bringing up sprint inadvertently when moving forward or engaged in a fight with an opponent ie it's easy to double tap 'W' by mistake.

 

Thx :)

Share this post


Link to post
Share on other sites

Tiddy-bits:

4 hours ago, bigblue said:

Is there any way that the sprint key can be changed eg. Q key ? I have players complaining that they keep bringing up sprint inadvertently when moving forward or engaged in a fight with an opponent ie it's easy to double tap 'W' by mistake.

 

Thx :)

Sure. I didn't use the Q key because I didn't want people giving away their positions in the dark with flashlights to sprint and because flashlight desync is annoying, but if you feel this is an acceptable compromise, do this:

 

On line 105, change

local runningforward = read_float(player_address + 0x278) > 0.0

to

local runningforward = read_float(player_address + 0x12C) > 0.0

This will have "runningforward" check if the flashlight is powered.

 

Next, on line 115, change

if(last_moving_duration < 0.5 and stopped_moving_time < 0.5 and player_energy[PlayerIndex] >= (minimum_energy/100)) then

to

if(player_energy[PlayerIndex] >= (minimum_energy/100)) then

This will not have it check the last time the player pressed the Q key.

 

Lastly, this is optional, but if you want to have the flashlight battery determine sprinting time, change the sprint_time variable on line 17 to 2000.0. This will give the player "unlimited" sprinting time, but only as long as their flashlight is activated.

King and Takka like this

Share this post


Link to post
Share on other sites

OK, I tried this and it works ok - but I think you're right about the flashlight. Problem being that once the sprint time ends, the flashlight stays on - potentially leaving lots of players running round with their lights left on and not realising. Also, anyone who has mapped the light to another key in their control settings will find that Q won't work for sprint. :)

 

Thx again.

Edited by bigblue

Share this post


Link to post
Share on other sites

How could I remove the sprint's default speed?
I would like there to be no predetermined speed
 

Share this post


Link to post
Share on other sites
8 hours ago, T3NSH1 said:

How could I remove the sprint's default speed?
I would like there to be no predetermined speed

You want to be able to set your own, you mean?


Oddly, this is familiar to you... as if from an old dream.  

Share this post


Link to post
Share on other sites

What I would like is that not everyone has a predetermined speed.
That there may be people with more or less speed than others

Share this post


Link to post
Share on other sites
3 minutes ago, T3NSH1 said:

What I would like is that not everyone has a predetermined speed.
That there may be people with more or less speed than others

That sounds awful lol

 

You want it randomized between a couple bounds, but differ each life, persistent with each player for the duration of the game, or varying throughout everyone's life?


Oddly, this is familiar to you... as if from an old dream.  

Share this post


Link to post
Share on other sites

I dunno, it could actually make for an awesome feature in a wacky gametype. Randomized within bounds and varying each life. Has potential. In something like plasma punchout, for example.

Share this post


Link to post
Share on other sites

the lua on my server when an admin gets more speed example x3 using the command "/ s me 3" the sprint automatically puts 1 so I put 2-3 or 5 of speed always has as pre-determined x1 and I want to disable that

Share this post


Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.