Difference between revisions of "OnPlayerModRobot - Actor"

605 bytes added ,  02:46, 20 September 2019
m
added remote papyrus event registration example
imported>Plplecuyer
 
imported>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m (added remote papyrus event registration example)
 
Line 12: Line 12:


== Parameters ==
== Parameters ==
*akSender
*akRobot: the robot that was modified
*akRobot: the robot that was modified
*akModBaseObject: the base object used to do the modification
*akModBaseObject: the base object used to do the modification
Line 21: Line 22:
   Debug.Trace(akRobot + " modified with " + akModBaseObject)
   Debug.Trace(akRobot + " modified with " + akModBaseObject)
endEvent
endEvent
</source>
=== Remoting ===
This event may also be handled via [[Remote Papyrus Event Registration]].
<source lang="papyrus">
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
</source>
</source>