Jump to content

Recommended Posts

Posted

Hi Cut and paste noob here im trying to edit an existing script to set a default hotkey via the script so i dont have to set it every playthrough, (AGO -Remove Projectiles) set to x key

 

so far i have this:

 

Int keyK_1
Int defkey = 45 ;X keycode
Event OnOptionDefault(Int keycode)
self.UnregisterForKey(keyK_1)
keyK_1 = keycode
self.RegisterForKey(keyK_1)
self.SetKeyMapOptionValue(defkey, keyK_1)
endEvent

 

but it does not seem to work any help apreciated thank you

Posted

this ended up working:

 

Int keyK_1
Function OnConfigInit()
keyK_1 = 45
self.RegisterForKey(keyK_1)
self.SetKeyMapOptionValue(keyK_1, 45)
endFunction

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...