Kapteyn Posted October 7, 2017 Share Posted October 7, 2017 (edited) If somebody has any ideas for getting the distance between two locations, I'd be much obliged. Now when I say locations, I mean exactly that... so I'm not talking about using object references, I'm looking at the actual distance between two places (for example, the distance between the map markers for Falkreath and the bastion on the cliff, that being the spots where one would fast-travel to). Edited October 7, 2017 by Kapteyn Link to comment Share on other sites More sharing options...
nerdofprey Posted October 7, 2017 Share Posted October 7, 2017 ...Is there an actual reason you can't use object references? Because map markers ARE object references. Link to comment Share on other sites More sharing options...
Kapteyn Posted October 7, 2017 Author Share Posted October 7, 2017 (edited) Yeah, I thought they were. The problem is this (I actually written this, but edited it because I've kinda fixed it but still want to know if I can use locations alone)... I'm scanning for markers to spawn stuff at, the actual spawns will be based on my current location type (which I define). If the location is a barrow, Draugr may spawn. The problem here is that if, for example, I'm walking into Falkreath past the bastion on the cliff, should I venture slightly off the path I might cross the border from either the general wilderness or Falkreath and into the barrow zone. So if a spawn is successful, the scanned object at which the spawn occurs could be in Falkreath because the village is within scanning range of the barrow. This is obviously a serious problem, we simply don't want Draugr appearing all day long killing everybody. I've fixed it by checking if the scanned object is in the same location as myself, at least with respect to barrows. I've also stopped the scan from even selecting markers in settlements altogether so it's fine now. In any case, I am still interested to know if there is any way to determine distances without using object references. Edited October 7, 2017 by Kapteyn Link to comment Share on other sites More sharing options...
foamyesque Posted October 7, 2017 Share Posted October 7, 2017 How are you scanning? It's possible via quest aliases to find a location, and then find an object specifically within that location, and then create references at that object, any or all of which can be restricted or modified by conditions. Link to comment Share on other sites More sharing options...
Kapteyn Posted October 7, 2017 Author Share Posted October 7, 2017 It's fine, I've got it working flawlessly now. I'm just intrigued with my general question about locations rather than objects. Anyway... Firstly I have OnLocationChange() running via an alias, but this does very few initial checks. What's actually doing the work is the main script attached to the quest which has a recurring single update with a minimum timer of one minute. So every minute it scans for markers from a form list, markers which appear by the thousands across the game world. Actually, I have two form lists - one for interiors, the other for exteriors. I'm running a series of checks to ensure things only spawn where they should, so not in villages for example or any interior which cannot be cleared (so not homes or shops). I'd post the script, but it's yuge. Link to comment Share on other sites More sharing options...
Recommended Posts