The OnGainLOS Event seems not to work

Post » Tue Jan 22, 2013 10:06 pm

I copied the OnGainLOS Event example from the Creation Kit Tutorial*, attached it to an object, and tried to run the script. I received no notification. The comment reads that passing the SomeFunction() function to the main body of the script is not necessary, since there is only one registration, but I wonder whether this lack is causing the script not to show a debug.trace. At any rate I'd appreciate seeing an example of a working OnGainLOS Event.

Here is the script as it appears in the Creation Kit tutorial:

Function SomeFunction()  RegisterForSingleLOSGain(Game.GetPlayer(), SecretDocuments) ; Before we can use OnGainLOS we must register.EndFunctionEvent OnGainLOS(Actor akViewer, ObjectReference akTarget)	;/ If other registrations had been done, we would want to check the viewer and target	   But since we only registered for one we know what it is	   Since we only did single los gain, we'll only get this once /;	Debug.Trace("Player just saw the documents!")endEvent

Thanks in advance

*I received a message that I do not have permission to post links.
User avatar
Leah
 
Posts: 3358
Joined: Wed Nov 01, 2006 3:11 pm

Return to V - Skyrim