Need Assistance With CityNavigator Object
Posted: Thu Sep 23, 2021 1:06 am
I'm so close to finishing the minimap mod, but I am hitting this last road block.
So as recommended to me, I starting playing with the CityNavigator Object and all its connected stuff. This worked in getting the proper position of a city location for placing markers.
However, I have one issue with it. Anytime I try to fast travel some where, the navigator object doesn't activate at the write time and returns a null error when grabbing the position.
This is the code here:
I tried everything to stop this including the following checks before running it:
Despite having my update loop stop after all of these null checks to ensure the streaming world is loaded, ready, and initialized, I still get a null error that stops the marker setup. It only happens on fast travel now too (I was able to stop all the other null errors using these checks).
So as recommended to me, I starting playing with the CityNavigator Object and all its connected stuff. This worked in getting the proper position of a city location for placing markers.
However, I have one issue with it. Anytime I try to fast travel some where, the navigator object doesn't activate at the write time and returns a null error when grabbing the position.
This is the code here:
Code: Select all
DaggerfallLocation Dflocation = GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject;
GameManager.Instance.StreamingWorld.GetCurrentCityNavigation().WorldToScenePosition(new DFPosition(Dflocation.Summary.MapPixelX, Dflocation.Summary.MapPixelX)
Code: Select all
if(GameManager.Instance.StreamingWorld.GetCurrentCityNavigation() == null) return;
Code: Select all
if(Dflocation.GetComponentInChildren<BuildingDirectory>() == null) return;
Code: Select all
if(Dflocation.GetComponentInChildren<BuildingDirectory>() == null) return;
Code: Select all
if(GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject == null) return;
Code: Select all
if(GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject == null) return;
Code: Select all
if(GameManager.Instance.SaveLoadManager.LoadInProgress || GameManager.Instance.StreamingWorld.IsInit || GameManager.Instance.StreamingWorld.IsRepositioningPlayer) return;