Tremulous Forum
General => Troubleshooting => Topic started by: Urcscumug on December 07, 2008, 12:03:03 pm
-
(This is about playing as human, BTW.)
I've seen that I can bind WASD to "boost" in addition to the actual move, which gets me automatic sprinting all time. I've do so for back (S) because most of the time you're gonna retreat it helps to be sprinting (it does more than help, it's the one thing keeping you one step away from the alien).
Example:
bind s "+back;boost"
You can do the same for all four keys (probably jump and crouch as well, to take effect when jetting.)
Except I don't want to do it automatically all the time. I wanted to design a key that would toggle using boost for WAD. In theory it's simple (I'll exemplify with just W, to keep it short):
set wboost "+forward;boost"
set boostmove "bind W vstr wboost; bind CTRL vstr normalmove; echo NORMAL MOVE ACTIVE"
set normalmove "bind W +forward; bind CTRL vstr boostmove; echo BOOST MODE ACTIVE"
bind CTRL vstr normalmove
This is where trouble begins. When I bind W to a single action it's perfectly alright to do it directly in normalmove. But if I want 2+ actions I can't, because there's no way to use quotes inside quotes (is there?) and it would get confused with the following commands. So I need to set a variable for those 2 commands and bind W to the vstr. But this doesn't work as intended; when I press W, both +forward and boost remain activated permanently and I can't turn them off anymore (I keep sprinting forward).
Let me put it another way. If I do bind W "+forward;boost" it works as intended. If I set "+forward;boost" in a variable and do bind W vstr variable, the commands in variable are repeated over and over forever. This only happens with moving and boost, however, not all commands.
Any solution? I'm using the 1.1.0 client, BTW.
-
try something like:
set wboost "bind w +forward;boost"
set boostmove "vstr wboost; bind CTRL vstr normalmove; echo NORMAL MOVE ACTIVE"
set normalmove "bind W +forward; bind CTRL vstr boostmove; echo BOOST MODE ACTIVE"
bind CTRL vstr normalmove
-
set wboost "bind w +forward;boost"
Doesn't work. If you don't put +forward;boost in quotes it treats them as separate commands. It binds W to +forward, then does a boost.
-
You could stick the bind w "+forward;boost" in a config file and then exec it. Totally hacky and shit, but should work.
-
:D That worked.
I've also noticed that A and D (side moves) do not make use of sprinting, so with S bound at all times it's only W left. But even so, here it is:
set boostmove "exec personal/helper_boost.cfg; bind CTRL vstr normalmove; echo NORMAL MOVE ACTIVE"
set normalmove "bind w +forward; bind CTRL vstr boostmove; echo BOOST MODE ACTIVE"
bind CTRL vstr normalmove
And in helper_boost.cfg:
bind w "+forward;boost"
Thank you.
-
Hi.
You can use it too : http://flame-clan.eu/members/Puma/Config/sprint-script_fixed.rar.
-
One question: I see that you too have assigned boost to left and right strafe. But does it do anything? I noticed that stamina doesn't drop even if you do this.
-
One question: I see that you too have assigned boost to left and right strafe. But does it do anything? I noticed that stamina doesn't drop even if you do this.
apparently not:
aForward = abs( ucmd->forwardmove );
//...
if( aForward <= 64 )
client->ps.stats[ STAT_STATE ] &= ~SS_SPEEDBOOST;
-
I guess I can't argue with the source code... Although everything I've tried seems to contradict it. For instance, I shot the rifle at a wall while moving in boost and normal mode respectively and counted the bullet marks. Same thing in both cases. It's not a fault in my toggle binds, it does the same if I use a key to engage boost.
-
I guess I can't argue with the source code... Although everything I've tried seems to contradict it. For instance, I shot the rifle at a wall while moving in boost and normal mode respectively and counted the bullet marks. Same thing in both cases. It's not a fault in my toggle binds, it does the same if I use a key to engage boost.
the source code confirms your tests, my comment was because i always thought otherwise.