Jump to content

FindClosestActor/FindRandomActor only returns Player?


Hoamaii

Recommended Posts

Hmm... I will test it and debug it, but if it works anywhere similar to FindRandomActor or FindClosestActor, chances are the Player will be the 1st NPC detected within that radius - since the ActorTypeNPC Keyword is attached to the HumanRace Race, and Player is HumanRace.

Link to comment
Share on other sites

Maybe I am wrong but I think the function looks for references FROM player not counting player itself. I was messing with this function and than was filling alias with that references and player never was there. (The way I may be mistaken is that I dont remember exactly which keyword I have used, I only remember that it was for actors)
Link to comment
Share on other sites

  • 1 month later...

Old topic but yeah..

 

FindRandomxxx

FindAnyReferencexxx

FindClosestxxx

etc

 

Will all return arCenter/the reference being called on if the thing you are searching for is the same type as arCenter/calling reference. It's not just the player, but any reference with the same type. For Skyrim, it really limited the usefulness of those functions.

FindAllReferencesWithKeyword, imo is the best way around this issue. As it returns an array of references thrown in based on keywords, you can then use some logic to remove certain types picked up in the array that you don't want, or whatever else you need.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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