Resident Evil 4

Resident Evil 4

View Stats:
autoxguy08 Mar 17, 2023 @ 4:02pm
Aim toggle
Since there is no aim toggle in the game, I tried using an auto key script that I had used that worked fine for resident evil village, but it did not work for RE4 remake demo. Maybe it will work for the full game, not sure.

Has anyone else used an autohotkey script that worked for them?
< >
Showing 16-25 of 25 comments
autoxguy08 Mar 31, 2023 @ 4:41pm 
Originally posted by Space:
That sounds quite decent. There is one last out of the box solution that might work, but I haven't tried it yet. It's somewhat tedious but it would get rid of any potential getting-stucks.

One could unbind Right Click to Aim in the game settings and instead bind a 'rare' keyboard key instead, such as CapsLock (I never ever use CapsLock during game or anywhere else really; Tilde key is in a similar category - i.e. the key left of 1 in the numbers row).

Then, you could write a script such as this:

#SingleInstance, Force #IfWinActive, ahk_exe re4.exe AimToggle=0 Rbutton:: AimToggle:=!AimToggle if(AimToggle) Send {CapsLock down} else Send {CapsLock up} return F11::Reload

Boom, no more sleep commands, delays, blocked inputs that cause keys to get stuck.

:mhwno: The only downside is that the game is "unplayable" without the script running.
Potentially you might lose track of your "CapsLock" status and when you change to a text field, you'll find yourself typing in all caps. I'm not sure about this one and whether AHK triggers an actual Caps keyboard state. My suspicion is on no.

:mhwgood: Upside is that it should allow for a flawless do-it-yourself Aim Toggle implementation.
Hopefully that should leave all menu interactions in tact as well 🤞
Wow, I will give this a try possibly tonight. I'm fine with having this script be necessary to be run in order to play the game.

This basically tells the game that whenever you hit the right mouse button, to map it to the action that caps lock key is defined to. But I guess what is the reason that keys would not get stuck with this method vs a regular aim toggle? Unless it is due to the way the game handles the right mouse button.

Also, what is the F11 reload thing at the end?

The only time I have ever used caps lock in a game was for the scanner mode where you do do hacks on enemies in cyberpunk. In dead space 2, I have to do very short autohotkey key script to map the right mouse button to a random key, because there, there is aim toggle in the game, but you cannot map the right mouse button to it... It's dumb.
Last edited by autoxguy08; Mar 31, 2023 @ 4:43pm
autoxguy08 Mar 31, 2023 @ 5:11pm 
Originally posted by Space:
That sounds quite decent. There is one last out of the box solution that might work, but I haven't tried it yet. It's somewhat tedious but it would get rid of any potential getting-stucks.

One could unbind Right Click to Aim in the game settings and instead bind a 'rare' keyboard key instead, such as CapsLock (I never ever use CapsLock during game or anywhere else really; Tilde key is in a similar category - i.e. the key left of 1 in the numbers row).

Then, you could write a script such as this:

#SingleInstance, Force #IfWinActive, ahk_exe re4.exe AimToggle=0 Rbutton:: AimToggle:=!AimToggle if(AimToggle) Send {CapsLock down} else Send {CapsLock up} return F11::Reload

Boom, no more sleep commands, delays, blocked inputs that cause keys to get stuck.

:mhwno: The only downside is that the game is "unplayable" without the script running.
Potentially you might lose track of your "CapsLock" status and when you change to a text field, you'll find yourself typing in all caps. I'm not sure about this one and whether AHK triggers an actual Caps keyboard state. My suspicion is on no.

:mhwgood: Upside is that it should allow for a flawless do-it-yourself Aim Toggle implementation.
Hopefully that should leave all menu interactions in tact as well 🤞
So I just tried this updated script, I had to change the bind from capslock (RE4 Remake doesn't let you use that as a keybind) and chose the numberpad plus key (NumpadAdd) since I was able to bind that to aim in game. That seems to work flawlessy!

The game menu is able to work with the right mouse key normally and I tried to get the actions to stick like they sometimes would with your other one and I could not get it to act up, at least for the few minutes I tried it for.

So you may have a winner there! Thank you so much!
Space Mar 31, 2023 @ 5:42pm 
Awesome, glad to hear it's working! Yeah I just noticed the CapsLock thing as well as I tried it in my most recent playing sesh. The F11::Reload thing is optional, you can remove it. It's just a reload switch in case you modify the script and you want it to refresh to the newest version (game would have to be focused for it to act). But I assume that won't be the case. It's the equivalent of right-clicking the AHK tray icon and choosing "Reload This Script", just hotkeyed. :cozyhitman2:
autoxguy08 Mar 31, 2023 @ 5:49pm 
Originally posted by Space:
Awesome, glad to hear it's working! Yeah I just noticed the CapsLock thing as well as I tried it in my most recent playing sesh. The F11::Reload thing is optional, you can remove it. It's just a reload switch in case you modify the script and you want it to refresh to the newest version (game would have to be focused for it to act). But I assume that won't be the case. It's the equivalent of right-clicking the AHK tray icon and choosing "Reload This Script", just hotkeyed. :cozyhitman2:
Understood. I guess once I get the full game, if I have any issues I'll comment back.
$p@rr0w Apr 1, 2023 @ 12:20pm 
Dudeee! I really don't know anything about scripting, and this is a huge help. Thank you so much for this!
autoxguy08 Apr 2, 2023 @ 9:41am 
Originally posted by Space:
Awesome, glad to hear it's working! Yeah I just noticed the CapsLock thing as well as I tried it in my most recent playing sesh. The F11::Reload thing is optional, you can remove it. It's just a reload switch in case you modify the script and you want it to refresh to the newest version (game would have to be focused for it to act). But I assume that won't be the case. It's the equivalent of right-clicking the AHK tray icon and choosing "Reload This Script", just hotkeyed. :cozyhitman2:
I hope you don't mind but I went ahead and uploaded the script that works to the nexus mods page (I did not take credit for it) so more people know about it.

Here is the link in case you wanted to know: https://www.nexusmods.com/residentevil42023/mods/334
Last edited by autoxguy08; Apr 2, 2023 @ 9:42am
Space Apr 2, 2023 @ 10:09am 
Yeah not at all, I'm glad if anyone can derive some benefit from it.
Bob Oct 17, 2024 @ 5:10am 
It happens to me too, and my mouse is brand new, a razer mouse, and its the only game with this kind of problem, cuz in re village and re4 original it dont happen
szpen Feb 15 @ 12:06am 
Doesn't work. HELP
Space Feb 15 @ 4:31am 
Run the script as admin or you have failed to read the instructions properly where it tells you to rebind right click aim to a key set in the autohotkey script.
< >
Showing 16-25 of 25 comments
Per page: 1530 50

Date Posted: Mar 17, 2023 @ 4:02pm
Posts: 25