I'm trying to make it so that when I press shift on demoman, a and d become + left (turn left) or +right (turn right), but then when i release it it returns a and d to their normal functions. so far i have bind a + left, bind d +right on shift, then the next two binds are a + moveleft and d +moveright. It works the first time, but it will get stuck on turning left/right and won't return to normal functions when I let go of it
#turn left/right using shift
1 messages · Page 1 of 1 (latest)
You probably want to do -left and -right when releasing shift
Haven't ever looked at the mastercomfig web thing so no clue if it allows for that or if you'd need to do it manually
also presumably you'd want -moveleft and -moveright when pressing shift so those don't get stuck either
If no one's started solving this in the next 7 or so hours, I'll whip up the script.
Just @ me later or something 🙂
@dusty dawn While you have say A held, when you press or let go of shift, do you want it to continue moving/turning until you let go of A and press it again.
Or do you want to instantly stop what it was doing and do the new thing? If that makes sense...
i want it to instantly stop what it was doing and do the new thing, for demoknight charge turning
@dusty dawn has leveled up! (0 ➜ 1)
damn it
Ok it'll take me a bit longer. I'll do it tomorrow (2am rn 😅)
the app doesn't have this functionality
at least right now, not 100% certain if there's plans to include some scripting functionality in the future
i kinda remember some talk about it but it's been a while, i could be misremembering
Yeah figures
It should be real simple to do manually
something like
alias turn "-moveleft;-moveright;bind a +left;bind d +right;alias action move"
alias action move
bind shift action```
of course if you want it to instantly switch between them you'll have to do a little extra stuff
basically you'd need to add an alias to keep track of whether a or d were pressed or not when shift gets pressed
yeah
although i seem to be struggling on how to handle that alias--i'm probably overcomplicating it
Im too lazy to test in game and not smart enough to think through it without testing
yeah i tried aliasing it all and setting it through a config file but it just ended up unbinding my a and d keys, and if i set it to rebind them afterwards it would occasionally get stuck turning if i let go of shift before a movement key
Well doing -left and -right or -moveleft and -moveright will take care of it getting stuck
but making it instantly switch between moving and turning without having to re-press a and d is a bit tricky
also what I posted up there would be to toggle it and after reading your OP it sounds like you want press shift to turn and release shift to move
so change it to a +/- command and no need to re-alias then
*so change it to a
+/- command and no need to
re-alias then*
- mysterious_eagle_46873
eg. alias +shift "-left;-right;bind a +moveleft;bind d +moveright" alias -shift "-moveleft;-moveright;bind a +left;bind d +right" bind shift +shift
doesn't instantly switch it though, you'd have to press a or d again
*doesn't instantly
switch it though, you'd have to press
a or d again*
- mysterious_eagle_46873
Can someone try this for me?
I'm not at my computer rn.```alias +shifttoggle "-moveleft;-moveright;alias leftaction +left;alias rightaction +right;checkleft;checkright"
alias -shifttoggle "-left;-right;alias leftaction +moveleft;alias rightaction +moveright;checkleft;checkright"
alias +leftkey "leftaction;alias checkleft leftaction"
alias -leftkey "-moveleft;-left;alias checkleft"
alias +rightkey "rightaction;alias checkright rightaction"
alias -rightkey "-moveright;-right;alias checkright"
-shifttoggle
bind a +leftkey
bind d +rightkey
bind shift +shifttoggle```
yeah seems to work perfectly
👌
@dusty dawn here's the script
you can place that in your demoman.cfg file (which should be in \cfg\overrides\)
i'd also encourage you to have a reset script; if you make a game_overrides.cfg file and place it within the same overrides folder, then you can reset the binds that the script modifies as such:
bind a +moveleft
bind d +moveright
unbind shift //or bind it to what you'd like if you use shift```