IsKeyPressed - Input: Difference between revisions

Jump to navigation Jump to search
m
Fixed minor oversight: changed "will is" to "is"
imported>JustinOther
m (→‎Notes: Redirected link to input events as they're members of Form)
imported>Cipscis
m (Fixed minor oversight: changed "will is" to "is")
Line 51: Line 51:
*To avoid multithreading mishaps, it's generally best to use [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]] rather than [[RegisterForUpdate - Form|RegisterForUpdate]].
*To avoid multithreading mishaps, it's generally best to use [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]] rather than [[RegisterForUpdate - Form|RegisterForUpdate]].
*If updating at tight intervals, optimization is key as it will make your polling script more responsive. It shouldn't be necessary to update at intervals < 0.25 and doing so just makes a script unnecessarily 'expensive'.
*If updating at tight intervals, optimization is key as it will make your polling script more responsive. It shouldn't be necessary to update at intervals < 0.25 and doing so just makes a script unnecessarily 'expensive'.
*Given the [[Form Script#SKSE Events|Input Events]] are available, they'll be preferable to the above polling methods for many applications as their 'cost' will is less.
*Given the [[Form Script#SKSE Events|Input Events]] are available, they'll be preferable to the above polling methods for many applications as their 'cost' is less.
*Avoid using keys already claimed by Skyrim. Invariably, mod added hotkeys will conflict, so it's best to offer a way to rebind your hotkey(s) via [[GetNthKeyPressed - Input|GetNthKeyPressed]] from an [[Options Menu]] or other readily accessible means such as a scripted inventory item. This will afford your mod elasticity and allow it to work in tandem with other hotkey bearing mods.
*Avoid using keys already claimed by Skyrim. Invariably, mod added hotkeys will conflict, so it's best to offer a way to rebind your hotkey(s) via [[GetNthKeyPressed - Input|GetNthKeyPressed]] from an [[Options Menu]] or other readily accessible means such as a scripted inventory item. This will afford your mod elasticity and allow it to work in tandem with other hotkey bearing mods.
*Using a property to store the dxKeycode of the key you are polling will allow the same script to be easily reused to poll for different keys simultaneously, as this allows the dxKeycode to be set (or the default value overridden) in the Creation Kit without editing the script's source
*Using a property to store the dxKeycode of the key you are polling will allow the same script to be easily reused to poll for different keys simultaneously, as this allows the dxKeycode to be set (or the default value overridden) in the Creation Kit without editing the script's source
Anonymous user

Navigation menu