Jump to content

DetectionLOS / DirectLOS question


FlashyJoer

Recommended Posts

Hi all,

 

I am trying to use the line of sight functions to determine if companion NPC can see the player when they do something. Currently the function that runs this is built into a RefAlias Quest script. My condition is as follows:

 

If AliasComp.IsPlayerTeammate() && (AliasComp.HasDirectLOS(PlayerREF)) (note: If I take detection portion away, the script works fine, knowing if NPC is traveling companion or not and firing appropriate outcomes - the detection portion breaks it)

 

I have read all pertinent entires on the CK wiki and note that the LOS should have .GetReference() at the end of it, however with this in there, the script will not compile. I have poured though the forums here for assistance and note that I should have an Object Reference declared, which i tried as:

 

Object Reference aPlayer = PlayerREF.GetReference()

If AliasComp.IsPlayerTeammate() && (AliasComp.HasDirectLOS(aPlayer))

 

This too does not compile, citing GetReference is not a function.

 

So I guess the question is, since the LOS stuff is Actor script based, how do I force the Quest AliasREF script to use these functions or am I trying something that is simply not possible (or that I am just completely unversed in getting to work as intended, lol).

 

Any assistance on this would be lovely! Thanks!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...