enderalse/source/scripts/_00e_mq13b_sc10_shaftsc.psc

68 lines
1.7 KiB
Plaintext
Raw Normal View History

Scriptname _00E_MQ13b_SC10_ShaftSC extends ObjectReference
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function StartRotationLoop()
if !bInit
RotationMarker = Self.PlaceAtMe(XMarkerHeading, 1)
bInit = True
EndIf
RotationMarker.SetAngle((fAngleX), (fAngleY), (Self.GetAngleZ() + 180))
Self.TranslateToREF(RotationMarker, RotationSpeedBase, RotationSpeedBase)
EndFunction
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnInit()
fPosX = Self.GetPositionX()
fPosY = Self.GetPositionY()
fPosZ = Self.GetPositionZ()
fAngleX = Self.GetAngleX()
fAngleY = Self.GetAngleY()
fAngleZ = Self.GetAngleZ()
RotationMarker = Self.PlaceAtMe(XMarkerHeading, 1)
EndEvent
Event OnTranslationAlmostComplete()
If MQ13b.bReliefRotating == True
StartRotationLoop()
EndIf
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
float fPosX
float fPosY
float fPosZ
float fAngleX
float fAngleY
float fAngleZ
bool bInit
_00E_MQ13b_Functions Property MQ13b Auto
ObjectReference RotationMarker
Float Property ActualSpeed Auto Hidden
Static Property XMarkerHeading Auto
Float Property RotationSpeedBase = 125.0 Auto
{The base speed the objects will rotate around with. Defaut: 25}