Sijko Posted August 3, 2012 Share Posted August 3, 2012 hello. can someone teasch me how to script the finding the nearest item.What do I mean.For example: I have a staff/ When I use it, it "detects" the nearest item and shows me where is it. If I'm In Anwil, it searches only in Anwil, if I'm in Cyrodiil it searches Cyrodiil (if it's possible). For ex. I'll program it for finding nirnroots. I use the staff and it says like "The nearest Nirnroot is 300 meters to the south-west". Is it possible at all to make such a script? Link to comment Share on other sites More sharing options...
WarRatsG Posted August 3, 2012 Share Posted August 3, 2012 Possible to a certain extent. For a start, it would be quite short range, seen as each exterior cell is about 50x50 metres (interior is larger). Not only that, but because scripts refer to items by their Editor ID instead of the names that they show in-game, it would be impossible to directly programme the staff with the item you were looking for if you were to refer to it by name. I honestly can't think of any method that would retrieve the Editor ID from the name alone. Link to comment Share on other sites More sharing options...
Sijko Posted August 3, 2012 Author Share Posted August 3, 2012 (edited) of course i meant that the item will be "hardcoded" to the script (i understand the diff btwn EDID and the "name"). let's start with that simple. Edited August 3, 2012 by Sijko Link to comment Share on other sites More sharing options...
WarRatsG Posted August 4, 2012 Share Posted August 4, 2012 Ah, my bad, I thought you meant program it in-game on a whim :ermm: To do what you've asked, I think you would need to do some "Ref-Walking". That would probably solve your range issues as well, to a certain extent, because it may not be able to find an object if it's not in memory. That means non-persistent references in cells that have not been loaded for a while. Ref-Walking requires OBSE. Is this OK? Link to comment Share on other sites More sharing options...
Sijko Posted August 4, 2012 Author Share Posted August 4, 2012 (edited) It is OK. What do we do next? Edited August 4, 2012 by Sijko Link to comment Share on other sites More sharing options...
Recommended Posts