Mouse Macro, Help!
#1
Posted 06 September 2013 - 09:21 PM
I want to be clear, this thread is not about the ethics of macros in the game. It's about how one can use techniques and technology to better deal with gauss in a high alpha fire support role. I tried using the gauss as is, I found it daunting.
#2
Posted 07 September 2013 - 03:45 AM
(Using the autohotkey scripting language, set the RMB to charge gauss on press, fire gauss and PPC on release)
SendMode, Event SetKeyDelay, 0, 50 charge_time := 0 #IfWinActive, ahk_class CryENGINE *~RButton:: send {5 down} charge_time := A_TickCount return *~RButton up:: send {5 up} if ((A_TickCount <= (charge_time + 2000)) && (A_TickCount >= (charge_time + 750))){ send {6} } return #IfWinActive
Gauss in group 5, PPCs in 6.
Will only fire PPCs if there is less than 2000ms (Is this correct figure for gauss max charge time?) between the key down and the key up.
Edited by evilC, 08 September 2013 - 01:49 PM.
#3
Posted 07 September 2013 - 11:09 AM
#4
Posted 07 September 2013 - 12:14 PM
#5
Posted 07 September 2013 - 01:05 PM
#6
Posted 07 September 2013 - 02:09 PM
#7
Posted 08 September 2013 - 05:12 AM
ie with this script as it stands, if you release the button before the gauss is charged, the PPCs will still fire.
#8
Posted 08 September 2013 - 05:41 AM
Am I just misunderstanding how this is written, or is the time written in simply not sufficient?
Edited by Catamount, 08 September 2013 - 05:45 AM.
#9
Posted 08 September 2013 - 10:51 AM
When you release the RMB, it checks to see if the gauss have lost charge (time since button held is greater than 2 secs)
if over 2 secs, it only releases the 5 key - nothing happens.
If under 2 secs, it releases 5 at the same time as hitting 6 - releasing 5 fires the gauss and hitting (and releasing) 6 fires the PPCs.
The gauss needs time to charge up also (ie it cannot fire until the green bar fills), so the < 2000 check should probably be more like > 1000 and < 2000 (ie the gauss finished charging, and did not lose it's charge)
#10
Posted 08 September 2013 - 11:17 AM
Thanks for the explanation.
Edited by Catamount, 08 September 2013 - 11:19 AM.
#11
Posted 08 September 2013 - 11:33 AM
Also, AHK is a quirky language at the best of times so don't let that discourage you.
#12
Posted 08 September 2013 - 12:33 PM
The chargeup is 0.75s iirc (don't use gauss much since the changes), but Is getting the charge-up accounted for really just as simple as something like this?
if (A_TickCount <= (charge_time + 2000) and A_TickCount >= (charge_time + 750))
or this?
if ((charge_time + 750) <= A_TickCount <= (charge_time + 2000))
I'd just test it myself, but I'm not in a position to play today :/
Edited by Catamount, 08 September 2013 - 12:34 PM.
#13
Posted 08 September 2013 - 01:47 PM
Changed code to incorporate 0.75s rule
now it will only fire if you release between 0.75s and 2s
Edited by evilC, 08 September 2013 - 01:50 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users