ScriptName SE43Script
Short BhishaNear ; flag that is set if Bhisha is close to Ushnar
Short HasDogFood ; flag that is set if Bhisha has taken the dog food
Short DogAttackPC ; flag that is set for the dog to attack the PC
;These objects have scripts on them
; SEBeggarBhishaRef
; SEUshnarGraShadborgobRef
; SE43SkeletalHoundRef
; SEUshnarDogRef
Begin GameMode
If GetStage SE43 < 200
If BhishaNear == 0
If SEUshnarGroShadborgobRef.GetDistance SEBhishaRef <= 512 ; Set flag if Bhisha is near Ushnar
Set BhishaNear to 1
EndIF
Else
If SEUshnarGroShadborgobRef.GetDistance SEBhishaRef > 512 ; Unset flag if Bhisha moves away from Ushnar
Set BhishaNear to 0
EndIf
EndIf
Endif
End |