OnPlayerModRobot - Actor

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Event send to the player when he modifies a robot

Syntax[edit | edit source]

Event OnPlayerModRobot(Actor akRobot, ObjectMod akModBaseObject)

Parameters[edit | edit source]

  • akSender
  • akRobot: the robot that was modified
  • akModBaseObject: the base object used to do the modification

Examples[edit | edit source]

; Event is sent to the player
Event OnPlayerModRobot(Actor akRobot, ObjectMod akModBaseObject)
  Debug.Trace(akRobot + " modified with " + akModBaseObject)
endEvent

Remoting[edit | edit source]

This event may also be handled via Remote Papyrus Event Registration.

Scriptname myExampleScript extends Quest

Event OnInit()
  RegisterforRemoteEvent(Game.GetPlayer(), "OnPlayerModRobot") ; listening for OnPlayerModRobot event
  Debug.Trace(self + " Actor.OnPlayerModRobot ", " Script is initialized and Robot Event Started. " )
EndEvent

Event Actor.OnPlayerModRobot(Actor akSender, Actor akRobot, ObjectMod akModBaseObject)
  Debug.Trace(self + "Actor.OnPlayerModRobot ", " Player Modified Robot ")
  ; do something cool here
EndEvent

See Also[edit | edit source]