1,482
edits
imported>Egocarib mNo edit summary |
m (Convert source tags to syntaxhighlight) |
||
| Line 6: | Line 6: | ||
== Definition == | == Definition == | ||
< | <syntaxhighlight lang="papyrus"> | ||
ScriptName ModEvent Hidden | ScriptName ModEvent Hidden | ||
</ | </syntaxhighlight> | ||
== SKSE Global Functions == | == SKSE Global Functions == | ||
| Line 39: | Line 39: | ||
Script that is sending the event: | Script that is sending the event: | ||
< | <syntaxhighlight lang=papyrus> | ||
SomeFunction() | SomeFunction() | ||
int handle = ModEvent.Create("ModPrefix_myCustomEvent") | int handle = ModEvent.Create("ModPrefix_myCustomEvent") | ||
| Line 50: | Line 50: | ||
endIf | endIf | ||
EndFunction | EndFunction | ||
</ | </syntaxhighlight> | ||
Script that wishes to receive the event: | Script that wishes to receive the event: | ||
< | <syntaxhighlight lang=papyrus> | ||
Function OnInit() | Function OnInit() | ||
RegisterForModEvent("ModPrefix_myCustomEvent", "OnMyCustomEvent") ;(remember to re-register for events each game reload) | RegisterForModEvent("ModPrefix_myCustomEvent", "OnMyCustomEvent") ;(remember to re-register for events each game reload) | ||
| Line 68: | Line 68: | ||
debug.trace(theString) ;prints "It worked!" | debug.trace(theString) ;prints "It worked!" | ||
EndEvent | EndEvent | ||
</ | </syntaxhighlight> | ||