enderalse/scripts/source/_00e_shovelingmarker.psc

37 lines
949 B
Plaintext

Scriptname _00E_ShovelingMarker extends ObjectReference
{Plays a shoveling animation when activated}
Import Utility
Event OnActivate(ObjectReference akActionRef)
if akActionRef != Game.GetPlayer()
Digger = akActionRef as Actor
; Digger.PathToReference(Self, 1.0)
StartDiggingAnimation(Digger)
Return
EndIf
EndEvent
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function StartDiggingAnimation(Actor DiggingActor)
Debug.SendAnimationEvent(DiggingActor, "IdleSmelterEnter")
Wait(15.0)
StopDiggingAnimation(DiggingActor)
Return
EndFunction
Function StopDiggingAnimation(Actor DiggingActor)
Debug.SendAnimationEvent(DiggingActor, "IdleForceDefaultState")
(DiggingActor as Actor).EvaluatePackage()
Wait(2)
Return
EndFunction
Actor Digger