Complete Example Scripts: Difference between revisions

Jump to navigation Jump to search
m
imported>JustinOther
m (→‎Cycle Through a List of Objects and Perform an Action on Each Object(Linked Ref Chain): GetPlayer swapped with PlayerREF property for consistency)
imported>JustinOther
Line 208: Line 208:
<source lang="papyrus">ScriptName MoveObjExample extends ObjectReference   
<source lang="papyrus">ScriptName MoveObjExample extends ObjectReference   


ObjectReference property dest auto
Actor Property PlayerREF Auto
ObjectReference Property kDest Auto


Event OnTriggerEnter(ObjectReference akActionRef)
Event OnTriggerEnter(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
If akActionRef == PlayerREF
akActionRef.TranslateToRef(dest,500) ; 500 is the speed value, it's pretty fast
akActionRef.TranslateToRef(kDest,500) ; 500 is the speed value, it's pretty fast
endif
EndIf
EndEvent </source>
EndEvent </source>


Anonymous user

Navigation menu