Jump to content


Photo

BF3 sprint toggle


  • Please log in to reply
11 replies to this topic

#1 BF3NATE

BF3NATE
  • Members
  • 4 posts

Posted 02 November 2011 - 05:30 AM

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.

#2 CodeKiller

CodeKiller
  • Members
  • 2066 posts

Posted 02 November 2011 - 01:37 PM

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

#3 BF3NATE

BF3NATE
  • Members
  • 4 posts

Posted 03 November 2011 - 02:01 PM

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.

#4 Elesar

Elesar
  • Members
  • 690 posts

Posted 03 November 2011 - 02:27 PM

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.

#5 CodeKiller

CodeKiller
  • Members
  • 2066 posts

Posted 03 November 2011 - 02:32 PM

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

#6 BF3NATE

BF3NATE
  • Members
  • 4 posts

Posted 03 November 2011 - 11:44 PM

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

#7 CodeKiller

CodeKiller
  • Members
  • 2066 posts

Posted 04 November 2011 - 09:49 AM

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

#8 justme2

justme2
  • Guests

Posted 04 November 2011 - 05:55 PM

I think your code got them banned.

#9 BF3NATE

BF3NATE
  • Members
  • 4 posts

Posted 05 November 2011 - 05:47 PM

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.

#10 haha

haha
  • Guests

Posted 14 July 2012 - 08:05 PM

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

#11 buddah37

buddah37
  • Guests

Posted 18 August 2012 - 04:04 PM

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.

#12 Driedman

Driedman
  • Members
  • 2 posts

Posted 27 January 2013 - 01:03 AM

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.