Jump to content

Papyrus - scanning for local nearby NPCs


nicktuh

Recommended Posts

I am going to make a mod and I know that part of what I want to do will require some in-depth scripting. Before I dive in, I want to know if the scripting language (Papyrus) even has the ability to do what I want. Using a combination of an activator and idleMakers, I need the ability to summon nearby NPCs to specific idleMarkers based on conditions that the player answers when activating the activator object. This will be dynamic and can change based on player interaction.

 

So, my question is. Does papyrus have the ability to scan for nearby NPCs?

 

Can it direct NPCs that it finds to idleMarkers based on criteria that the player selects in game?

 

(not asking how to code this function, just does the compiler/language have this level of control?)

 

Thank you for your input!

Link to comment

I found an answer to my own question, figured I posted what I found in-case someone else has the same question in the future.

 

http://www.creationkit.com/FindClosestActor_-_Game

http://www.creationkit.com/FindRandomActorFromRef_-_Game

 

These two functions return the closest actor; since 'player' is also an actor it would return player if they were too close to the object. However I can simply add a while loop with a conditional count to remedy this issue.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use