I have, or will have, a feature in my game that allows the player to Teleport randomly, around the current map they are in.
I tried building this feature and it works to a degree. I can trigger Teleport on certain events, and I can move the player to a predetermined location. What I can’t figure out, is how to pick a random X,Y value, within the map bounds. I also have an issue with Z bounds. Randomly picking a Z value will put the player too high or completely below the map.
I believe the “logic” for this is to
-Find random X,Y in current map bounds.
-Check X,Y for landscape Z value.
-Z value + 5 = NewZValue
-Move player to X,Y,NewZValue
Am I on the right path here? Thank you.