Page 1 of 1

How can I find out where the player is?

PostPosted: Fri Apr 01, 2016 17:35
by burli
Hi, how can I find out where the player is? I don't mean the coordinates. I mean which biome. Is he in a forest? On the beach? In the water? In a cave?

I know this is done in the ambience mod, but that does not work very well. For example, if the player is in a cave with a lake ocean waves and gulls are played.

Is there a better way to do this?

Re: How can I find out where the player is?

PostPosted: Fri Apr 01, 2016 23:17
by Don
All I can think is get_pos then find_nodes_in_radius.
The you can see what nodes are around.

For example instead of looking for water to make ocean sounds check for water and sand. For caves it would be water and not sand.

Re: How can I find out where the player is?

PostPosted: Sat Apr 02, 2016 00:31
by benrob0329
Perhaps you could test the temperature and node type at the coordanince, as well as how far underground the player is?

Re: How can I find out where the player is?

PostPosted: Sat Apr 02, 2016 05:27
by burli
benrob0329 wrote:Perhaps you could test the temperature and node type at the coordanince, as well as how far underground the player is?


That's how ambience works. But you can be "underground" above sea level and as far as I could see the ambiance checks for water and position

I hope that there is another method than checking for nodes around the player