Advertisement
t3h_m00kz

CampaignAbilities.ahk

Mar 6th, 2022
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Streamline controls for abilities in the campaign.
  2. ;Instead of switching and then using in two separate inputs,
  3. ;this combines the switch and the use into one.
  4.  
  5. #Include Init.ahk
  6.  
  7. #If WinActive("ahk_exe HaloInfinite.exe")
  8.  
  9. global markLocked
  10.  
  11. ;Grapple
  12. *1::
  13. *CapsLock::
  14.     useAbility(1)
  15.     return
  16.  
  17. ;Dash - Control key activates on up unless using ~ prefix
  18. *2::
  19. *~Control::
  20.     useAbility(2)
  21.     return
  22.  
  23. ;Shield Wall
  24. *3::
  25.     useAbility(3)
  26.     return
  27.    
  28. ;Threat Sensor
  29. *4::
  30.     useAbility(4)
  31.     return
  32.  
  33. ;Press the received key and then activate equipment
  34. useAbility(key){
  35.     send {blind}{%key% down}
  36.     sleep 1
  37.     send {blind}{%key% up}
  38.  
  39.     sleep 1
  40.  
  41.     send {blind}{o down}
  42.     sleep 1
  43.     send {blind}{o up}
  44.  
  45.     return
  46.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement