Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

BF3 sprint toggle


  • Please log in to reply
11 replies to this topic
BF3NATE
  • Members
  • 4 posts
  • Last active: Nov 11 2011 01:21 PM
  • Joined: 02 Nov 2011
I am having a hard time with having to hold a key to sprint, or double tapping W to continuously sprint while playing Battlefield 3.

Another two guys I play with from work complain about this as well.
We would appreciate it someone could help us with a sprint toggle where the default L Shift key is used.

Thanks in advance for replies.

CodeKiller
  • Members
  • 2067 posts
  • Last active: Feb 26 2016 09:30 AM
  • Joined: 10 Jul 2008
What's the key to sprint ?
If it's already LShift :
LShift::
If (Siwtch := ! Switch)
    Send {LShift Down}
Else
    Send {LShift Up}
Return

If it doesn't work with Send, try SendInput and SendPlay, of ot's still doesn't work... Bougth some glue and stick the key to sprint. :-P
By the way do you know that le most part of FPS game use this sytem to sprint (having a key hold down) ?
It's not a big thing, all players play with that...

BF3NATE
  • Members
  • 4 posts
  • Last active: Nov 11 2011 01:21 PM
  • Joined: 02 Nov 2011
We were looking for something that could be launched.
The script would also have to take into consideration other keys being pressed.
I think we would need a gamers approach so they understand how the sprint toggle would work.
My friend and I both tried to put something together, and failed.
We figured for someone here it would be easy to do.

If we could get something together that works. We plan on sharing it across some other forums.
The working script could potentially be used by hundreds of players.

Elesar
  • Members
  • 696 posts
  • Last active: May 08 2015 09:51 PM
  • Joined: 28 Jun 2007

We were looking for something that could be launched.

It is neither common or good practice to distribute compiled code on this forum. The above code can be placed in a file and launched like any other script.

The script would also have to take into consideration other keys being pressed.

Such as?

I think we would need a gamers approach so they understand how the sprint toggle would work.

Several of us are gamers, we understand how the games work, just not what you have in your head. You need to explain exactly what is desired from the script.

My friend and I both tried to put something together, and failed.

Where are these attempts? Most of the forum members are reluctant to help if the person requesting a script shows no effort. Show us what you tried and we can help to improve it.

If we could get something together that works. We plan on sharing it across some other forums.

Situations like this are tricky. There is the chance that your potential script could be flagged as a hack and start getting people banned. Also, you must take into account the term "credit where credit is due". If someone does take pity on you and gives you a functioning script, be sure to credit them and not take all the glory for yourself.

CodeKiller
  • Members
  • 2067 posts
  • Last active: Feb 26 2016 09:30 AM
  • Joined: 10 Jul 2008
ROFL ! You're kidding me ???
I play since my 6yo, I started on the Amstrad CPC 6128 "dude"...

I just say that you DON'T NEED a "toggle sprint" to play FPS like BF3...
As you mentioned it, I guess hudreds of players play without this toggle key and I guess they do it fine.

This one should work anyway (it's working fine in app in Windows, just try it) :

$LShift::
If (Switch := !Switch)
{
	KeyWait LShift
    Send {LShift Down}
} Else {
	KeyWait LShift
    Send {LShift Up}
	}
Return

So when you press LShift it toggle the LShift key (in windows it does the same as keeping it pressed or as pressing CapsLock).

Also, you must take into account the term "credit where credit is due". If someone does take pity on you and gives you a functioning script, be sure to credit them and not take all the glory for yourself.


I guess it must be me... :-D

BF3NATE
  • Members
  • 4 posts
  • Last active: Nov 11 2011 01:21 PM
  • Joined: 02 Nov 2011
Awesome, thanks for the replies.
To be completely honest, me and my co-worker are new to scripting.

Well we used this Crouch/Sprint/Aim Toggle AutoHotkey script we found on EA Forums.
Seems to be a acceptable situation to use these scripts.
This was used for a few hundred hours of BFBC2 gameplay by all of us.

Were looking for the same functionality with Battlefield 3, minus the crouch, and aim toggle.


<!-- m -->http://forum.ea.com/...ist/421736.page<!-- m -->

Also, yes we would love to give credit where its due.
Well name it CodeKiller's BF3 Spint Toggle. :)

CodeKiller
  • Members
  • 2067 posts
  • Last active: Feb 26 2016 09:30 AM
  • Joined: 10 Jul 2008
Honestly I wasn't sure at all it would work (is it really working ???)... :p

justme2
  • Guests
  • Last active:
  • Joined: --
I think your code got them banned.

BF3NATE
  • Members
  • 4 posts
  • Last active: Nov 11 2011 01:21 PM
  • Joined: 02 Nov 2011

Honestly I wasn't sure at all it would work (is it really working ???)... :p


Not even sure how to apply that code while I am in game.
If you take a look through the bunchafunk code after downloading through the link above.
The sprint(L shift) needs to stop once pushing crouch©, aim(rmb), or prone(x).
These are all default keybindings for BF3.
Seen some more threads asking for a sprint toggle on Battllelog forums.
I totally understand you don't think its needed, for me its a comfort thing while playing.
For others they might be disabled, hand problems or what not.
These are some of the reasons why people want a sprint toggle.

haha
  • Guests
  • Last active:
  • Joined: --
Actually in BF3 you can use the same key for multiple commands. So just bind your W to move forwards and sprint at the same time. :D

buddah37
  • Guests
  • Last active:
  • Joined: --
I am sorry to resurrect an old thread, but I am looking for the same thing. It really isn't a big deal, unless you are playing with an xbox controller; then pressing the left thumbstick in while trying to steer or fly a vehicle causes control-ability issues. Sometimes I even dabble with using the controller to run and shoot, and it definitely makes it hard to perform quick maneuvers if you have to hold pressure on the thumbstick that also controls the direction of movement. Flying a jet using that pressure makes it hard to use the yaw controls accurately, etc.

Driedman
  • Members
  • 2 posts
  • Last active: Mar 06 2013 07:22 AM
  • Joined: 27 Jan 2013

BF3Nate he gave you a code that you are supposed to compile with AHK, as he was assuming that you have ahk to compile it with.