Hi ! I'm beginner and I'd like to understand how the LOS events work. I kinda need a bit of help, please ? :smile: EDIT : Let's make it much simpler, here's my code :
Scriptname sun extends Actor
Function SomeFunction()
RegisterForSingleLOSGain(Game.GetPlayer(), self)
EndFunction
Event OnGainLOS(Actor akViewer, ObjectReference akTarget)
if akViewer == Game.GetPlayer()
if akTarget == self
; do stuff
Endif
Endif
EndEvent
Event OnLostLOS(Actor akViewer, ObjectReference akTarget)
if akViewer == Game.GetPlayer()
if akTarget == self
; stop doing stuff
Endif
Endif
EndEventI don't understand why it doesn't work x( It should "do stuff" when the player is seeing the object having this script.