[DEV SERVER] Loading description...
Caveats
CK Wiki - Notes
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
- The event will be sent to an event in this script named "<object type>.<event name>" which will accept the same parameters as the desired event, and also a sender parameter.
- The object type in the remote event definition must be the script where the event was originally defined. For example, if you wanted to get the OnActivate event, you would use ObjectReference, even though Actor also can receive the event (it inherits the event from ObjectReference). The compiler should give you an appropriate error and suggestion to fix if the type is incorrect.
Parameters
ScriptObjectakEventSource
CK Wiki Description
The ScriptObject that receives the event we want to also receive.
stringasEventName
CK Wiki Description
The event we want relayed to us. This must be a raw string literal and may not be a variable.
Examples
Event OnInit()
; Register for Activate event from the secret door
RegisterForRemoteEvent(SecretDoor, "OnActivate")
EndEvent
; Special event to receive when the door is activated
; Note the type in the event name matches the type of the first parameter, and is also the script where the
; event is originally defined.
Event ObjectReference.OnActivate(ObjectReference akSender, ObjectReference akActionRef)
Debug.Trace(akSender + " was activated by " + akActionRef)
EndEventAuto-Generated Example
ScriptObject myScriptObject__akEventSource
ScriptEventName (string[]) myScriptEventName (string[])__asEventName
bool returnedValue = myScriptObject__toCallFunctionOn.RegisterForRemoteEvent(myScriptObject__akEventSource, myScriptEventName (string[])__asEventName)Related Pages
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
