enderalse/scripts/source/_00e_game_synchanimationsc.psc

58 lines
1.4 KiB
Plaintext

Scriptname _00E_Game_SynchAnimationSC extends ObjectReference
Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == PlayerREF
SynchAnimations()
Endif
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
If akActionRef == PlayerREF
DesynchAnimations()
Endif
EndEvent
Function SynchAnimations()
if __Config_iDancerNumber == 3
Dancer_01.SetAnimationVariableBool("bIsSynced", true)
Dancer_02.SetAnimationVariableBool("bIsSynced", true)
Dancer_03.SetAnimationVariableBool("bIsSynced", true)
Elseif __Config_iDancerNumber == 2
Dancer_01.SetAnimationVariableBool("bIsSynced", true)
Dancer_02.SetAnimationVariableBool("bIsSynced", true)
Elseif __Config_iDancerNumber == 1
Dancer_01.SetAnimationVariableBool("bIsSynced", true)
Endif
EndFunction
Function DesynchAnimations()
if __Config_iDancerNumber == 3
Dancer_01.SetAnimationVariableBool("bIsSynced", false)
Dancer_02.SetAnimationVariableBool("bIsSynced", false)
Dancer_03.SetAnimationVariableBool("bIsSynced", false)
Elseif __Config_iDancerNumber == 2
Dancer_01.SetAnimationVariableBool("bIsSynced", false)
Dancer_02.SetAnimationVariableBool("bIsSynced", false)
Elseif __Config_iDancerNumber == 1
Dancer_01.SetAnimationVariableBool("bIsSynced", false)
Endif
EndFunction
int Property __Config_iDancerNumber Auto
Actor Property Dancer_01 Auto
Actor Property Dancer_02 Auto
Actor Property Dancer_03 Auto
Actor Property PlayerREF Auto