#turn left/right using shift

1 messages · Page 1 of 1 (latest)

dusty dawn
#

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

sacred edge
#

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

edgy wedge
#

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 🙂

edgy wedge
#

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

dusty dawn
#

i want it to instantly stop what it was doing and do the new thing, for demoknight charge turning

blazing gorgeBOT
#

@dusty dawn has leveled up! (0 ➜ 1)

edgy wedge
#

damn it
Ok it'll take me a bit longer. I'll do it tomorrow (2am rn 😅)

patent hemlock
#

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

sacred edge
#

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

patent hemlock
#

yeah the instant switch is tricky

#

i'm trying to figure it out atm

sacred edge
#

basically you'd need to add an alias to keep track of whether a or d were pressed or not when shift gets pressed

patent hemlock
#

yeah

#

although i seem to be struggling on how to handle that alias--i'm probably overcomplicating it

sacred edge
#

Im too lazy to test in game and not smart enough to think through it without testing

dusty dawn
sacred edge
#

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

lost latchBOT
#

*so change it to a

+/- command and no need to

re-alias then*

sacred edge
#

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

lost latchBOT
#

*doesn't instantly

switch it though, you'd have to press

a or d again*

edgy wedge
#

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

patent hemlock
edgy wedge
#

👌

patent hemlock
#

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