Form Script: Difference between revisions
Jump to navigation
Jump to search
m
Added new SKSE functions/events.
imported>PurpleLunchbox |
imported>JustinOther m (Added new SKSE functions/events.) |
||
| Line 112: | Line 112: | ||
'''bool Function [[HasKeywordString - Form|HasKeywordString]](string s)''' | '''bool Function [[HasKeywordString - Form|HasKeywordString]](string s)''' | ||
*Returns whether this form has a keyword with the specified string. | *Returns whether this form has a keyword with the specified string. | ||
'''Function [[RegisterForKey - Form|RegisterForKey]](int keyCode) | |||
*Registers for OnKeyDown and OnKeyUp events for the given [[Input_Script#DXScanCodes|DXScanCode]]. | |||
'''Function [[UnregisterForKey - Form|UnregisterForKey]](int keyCode) | |||
*Unregisters for OnKeyDown and OnKeyUp events for the given [[Input_Script#DXScanCodes|DXScanCode]]. | |||
'''Function [[UnregisterForAllKeys - Form|UnregisterForAllKeys]]() | |||
*Unegisters all registered [[Input_Script#DXScanCodes|DXScanCodes]]. | |||
'''Function [[RegisterForMenu - Form|RegisterForMenu]](string menuName) | |||
*Registers for OnMenuOpen and OnMenuClose events for the given menu. | |||
'''Function [[UnregisterForMenu - Form|UnregisterForMenu]](string menuName) | |||
*Unregisters for OnMenuOpen and OnMenuClose events for the given menu. | |||
'''Function [[UnregisterForAllMenu - Form|UnregisterForAllMenus]]() | |||
*Unregisters all registered menus. | |||
'''Function [[RegisterForModEvent - Form|RegisterForModEvent]](string eventName, string callbackName) | |||
*Registers a custom event callback for given event name. | |||
'''Function SendModEvent - Form|(string eventName, string strArg = "", float numArg = 0.0) | |||
*Sends a custom event with given generic parameters. | |||
'''Function [[UnregisterForModEvent - Form|UnregisterForModEvent]](string eventName) | |||
*Unregisters a custom event callback for given event name. | |||
'''Function [[UnregisterForAllModEvents - Form|UnregisterForAllModEvents]]() | |||
*Unregisters all registered custom events. | |||
'''Form Function [[TempClone - Form|TempClone]]() | |||
*Returns a temporary clone of this form | |||
== Events == | == Events == | ||
| Line 118: | Line 151: | ||
'''Event [[OnAnimationEventUnregistered - Form|OnAnimationEventUnregistered]](ObjectReference akSource, string asEventName)''' | '''Event [[OnAnimationEventUnregistered - Form|OnAnimationEventUnregistered]](ObjectReference akSource, string asEventName)''' | ||
*Received when one of the animation events we are listening for has been automatically unregistered by the game due to the target animation graph unloading. | *Received when one of the animation events we are listening for has been automatically unregistered by the game due to the target animation graph unloading. | ||
| Line 140: | Line 174: | ||
'''Event [[OnUpdateGameTime - Form|OnUpdateGameTime]]()''' | '''Event [[OnUpdateGameTime - Form|OnUpdateGameTime]]()''' | ||
*Received at periodic intervals of game time, if the form is registered. | *Received at periodic intervals of game time, if the form is registered. | ||
== SKSE Events == | |||
Event [[OnKeyDown - Form|OnKeyDown]](int keyCode) | |||
*Received when key(s) registered via [[RegisterForKey - Form|RegisterForKey]] are pressed. | |||
Event [[OnKeyUp - Form|OnKeyUp]](int keyCode, float holdTime) | |||
*Received when key(s) registered via [[RegisterForKey - Form|RegisterForKey]] are released. | |||
Event [[OnMenuOpen - Form|OnMenuOpen]](string menuName) | |||
*Received when menu(s) registered via [[RegisterForMenu - Form|RegisterForMenu]] are opened. | |||
Event [[OnMenuClose - Form|OnMenuClose]](string menuName) | |||
*Received when menu(s) registered via [[RegisterForMenu - Form|RegisterForMenu]] are closed. | |||