4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

68 lines
1.7 KiB

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}