FlashyJoer Posted October 29, 2017 Share Posted October 29, 2017 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 More sharing options...
ThoraldGM Posted October 29, 2017 Share Posted October 29, 2017 Try ObjectReference aPlayer instead of "Object Reference" aPlayer. I think syntax is your only error. Link to comment Share on other sites More sharing options...
Recommended Posts