Caveblazers
Here's an AutoIt script for mouse controls
Description
Personally I've found the default controls slightly unusual - you shoot with the right stick and jump with A (on XB layout), which means that you cannot do both at once without additional movement. While you can rebind the jump button to a shoulder/trigger button, that only partially helps, as neither seem particularly intended for fast repetitive actions on XB gamepads, and you cannot have two buttons (to only use the shoulder/trigger when you need to fire & jump) bound at once.

After struggling for a little while with that, I decided to switch to keyboard, and was disappointed to find that keyboard scheme has you bind 4 keys for aiming instead of using a mouse. I've seen this before, and I'm honestly uncertain as to where people get this particular idea, as it is a bit of a shame not to use the pointing device if it is pretty much warranted that there is one connected.

As result I wrote a small program that allows to use mouse for aiming and melee+ranged attacks in Caveblazers. The way this works is trivial - you specify a position on screen, and the program converts the direction from it to mouse cursor into arrow key presses for ranged attacks while the primary mouse button is held; Secondary mouse button presses are converted into melee attacks, allowing to only keep one hand on keyboard at all times and enjoy the game in a familiar setup (if you are used to games with mouse aiming, that is).

Installation
- Extract the program's executable wherever.
- Set the game to use arrows as aiming controls, and R for melee

Usage:
Run the game and the program.
Press T to set reference point - usually the center of the screen.
You can now use primary mouse button to aim & shoot, and secondary mouse button for melee attack.
Once you're done playing, find the program in system tray (same icon as executable), right-click it, and pick Exit.

Pre-built executable:
https://www.dropbox.com/s/jsecfm8pmqx1xfx/caveblazers-mouseaim.zip?dl=0

Source code (for AutoIt[www.autoitscript.com]):
#include <Misc.au3> $tolz = 0.33 ; deadzone $ukey = "T" ; key to reposition reference point $posx = 0 $posy = 0 $nort = False $east = False $west = False $sout = False $spec = False $game = False $user32 = DllOpen("user32.dll") While 1 ; detect focus, bind/unbind hotkey $game0 = $game $game = WinGetTitle("[ACTIVE]") == "Caveblazers" If ($game And Not $game0) Then HotKeySet($ukey, "Update") If ($game0 And Not $game) Then HotKeySet($ukey) ; track direction to mouse when primary button is held: $nort0 = $nort $sout0 = $sout $east0 = $east $west0 = $west If ($game And _IsPressed("01", $user32)) Then $relx = MouseGetPos(0) - $posx $rely = MouseGetPos(1) - $posy $rell = Sqrt($relx * $relx + $rely * $rely) If ($rell > 0) Then $relx = $relx / $rell $rely = $rely / $rell EndIf $nort = $rely < -$tolz $sout = $rely > $tolz $west = $relx < -$tolz $east = $relx > $tolz Else $nort = False $sout = False $east = False $west = False EndIf ; track secondary mouse button: $spec0 = $spec $spec = $game And _IsPressed("02", $user32) ; press/release keys when state changes: If ($nort And Not $nort0) Then Send("{up down}") If ($nort0 And Not $nort) Then Send("{up up}") If ($sout And Not $sout0) Then Send("{down down}") If ($sout0 And Not $sout) Then Send("{down up}") If ($west And Not $west0) Then Send("{left down}") If ($west0 And Not $west) Then Send("{left up}") If ($east And Not $east0) Then Send("{right down}") If ($east0 And Not $east) Then Send("{right up}") If ($spec And Not $spec0) Then Send("{r down}") If ($spec0 And Not $spec) Then Send("{r up}") ; wait a bit: Sleep(10) WEnd Func Quit() Exit EndFunc Func Update() $posx = MouseGetPos(0) $posy = MouseGetPos(1) EndFunc
Known issues:
- This strips you of ability to use left click to navigate menus, although you can still use the mouse to highlight menu items and press Space/jump to trigger them.
- Since the program is unaware of actual character position in-game, top and bottom section of the levels can prove slightly confusing at first. This takes a bit of time to get used to, but alternatively you can press T again to update the reference point to where the character is at the time.

Have fun!
Last edited by YellowAfterlife; Nov 1, 2017 @ 1:33am
< >
Showing 1-2 of 2 comments
epikPhailure Nov 4, 2017 @ 8:38pm 
+1 For respecting use of AutoIT
Festival Of Tears Jan 23, 2019 @ 6:50pm 
1+ Thanks So Much!
Last edited by Festival Of Tears; Jan 23, 2019 @ 7:06pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50