Need help: How to use FindClosestActor function

Post » Sun Jan 11, 2015 10:27 pm

Actor Function FindClosestActor(float afX, float afY, float afZ, float afRadius) native global
Accroding to Creation kit official page
  • afX: center of the search, X component
  • afY: center of the search, Y component
  • afZ: center of the search, Z component

I don't understand the meaning of afX, afY, afZ, is that means the coordinate in the render window?

Is it possible to set the center of the search to player?

Thank you for your help

User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Mon Jan 12, 2015 7:17 am

Those are coordinates in a given cell/game world(not sure)

For example, if you wanted to find an actor in the dead center of a cell, and have it check from that single point in a 1,000 unit radius, you do FindClosestActor(0,0,0, 1000.0).

Note: It cannot be used for finding the closest actor to the player, because it doesn't exclude the player from the search.

User avatar
[ becca ]
 
Posts: 3514
Joined: Wed Jun 21, 2006 12:59 pm


Return to V - Skyrim