Difference between revisions of "Talk:FindClosestActorFromRef - Game"

m
imported>Rasikko
(→‎SKSE alternative: Made a better function than the last one I made.)
imported>Rasikko
Line 18: Line 18:
; Bail if the cell contains more actors than an array can hold.
; Bail if the cell contains more actors than an array can hold, or if the only actor is akCenter.
if (CellRefs >= 129 || CellRefs == 0)
if (CellRefs >= 129 || CellRefs == 1)
return none
return none
endif
endif
Line 43: Line 43:
EndFunction
EndFunction
</source>
</source>
This will return the closest actor. How fast this function returns, depends on how many actors are in the cell. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2017-12-15T14:47:39 (EST)
This will return the closest actor. How fast this function returns, depends on how many actors are in the cell. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2017-12-31T04:01:58 (EST)
Anonymous user