Scriptname KA_RevScrollBarrierSCRIPT extends ObjectReference  

objectreference property barrier auto

sound property mySFX auto

actor property playerref auto

objectreference property collisionMarker auto

Armor Property Robes auto
Armor Property ArmoredRobes auto
Armor Property Boots auto
Armor Property Mask auto
Armor Property Gloves auto

float Property Volume Auto
{The volume you'd like the sound to play at (Between 0 and 1, (DEFAULT = 1))}


EVENT onTriggerEnter(objectReference triggerRef)

if triggerRef == PlayerRef
	if (PlayerRef.IsEquipped(robes) || PlayerRef.IsEquipped(ArmoredRobes)) && PlayerRef.IsEquipped(Mask) && PlayerRef.IsEquipped(Gloves) && PlayerRef.IsEquipped(Boots)
		;do nothing
	else	
		barrier.GetLinkedRef().enable()		
		barrier.PlayAnimation("playanim02")		
; PlaySoundFX
		int soundInstance = MySFX.play(barrier)
		sound.SetInstanceVolume(soundInstance, Volume)
		utility.wait(1.2)
	endif
endif
EndEVENT

EVENT OnTriggerLeave(ObjectReference akActionRef)				
		barrier.PlayAnimation("playanim01")		
		barrier.GetLinkedRef().disable()	
EndEvent