tek753 Posted February 5, 2014 Share Posted February 5, 2014 (edited) Hi all, I'd like to use a script specifically to detect all game / animals nearby (and then output the distance to that animal from the player). My script is: nearestPrey = Game.FindClosestReferenceOfAnyTypeInListFromRef(prey, Game.GetPlayer(), 2048) where prey is a FormList. To build the list, I typed 'goat' in the CK, under the 'all' section, and dragged every NPC/LevelledList item and anything that vaguely resembled a goat (except sounds, art, etc) and put it in the list and saved. I did the same for deer, elk, foxes. When i go into the wild, and run the script, it can't find anything, even while standing right in front of a fox or a goat. Is there a way I can get their ID in the game and then somehow figure out where they are in the CK? The ID when you click on an animal in game is the REFID, right, and not the FORMID, so I can't just use that ID correct? I have about 90 mods installed but don't really think any of them affect the goats or foxes (but if they did, wouldn't they be part of the GoatFaction or FoxFaction?). And if those factions are on the formlist, wouldn't the goat come up in my script? ..To prove the thing wasn't broken in another way, I just typed help "goat" 4 and about 15 matches came up. then I spawned all 15 and when I ran the command the script found one of them (only one, however). What do you think is happening? Thanks! Edited February 5, 2014 by tek_7 Link to comment Share on other sites More sharing options...
Recommended Posts