Jump to content

how to detect if underground?


Recommended Posts

Posted

Hey y'all,

Is there a way to detect if your character is underground? Trying to figure out the best way to detect if I'm near... Hill Giants.

 

Would my getZ() == -1?

 

Thanks in advance!

 

Check your Z plane or define an area inside the dungeon and check if it contains your player.

Posted

Open the entity debugger and hover over a position. This will tell you it's x,y and z position. The z position will therefore be the same as the rest of the dungeon. However there are some dungeons and rooftops with z co-ords of 0 (and if my memory serves correctly hill giants may well be one of them?) so if that is the case then you can always create an area and check if you're in it. Alternatively, seeing as u just climbed down a ladder, you could check whether the ladder has a 'climb-up' option instead of a 'climb-down' option :)

 

~apa

  • Like 3
Posted

Open the entity debugger and hover over a position. This will tell you it's x,y and z position. The z position will therefore be the same as the rest of the dungeon. However there are some dungeons and rooftops with z co-ords of 0 (and if my memory serves correctly hill giants may well be one of them?) so if that is the case then you can always create an area and check if you're in it. Alternatively, seeing as u just climbed down a ladder, you could check whether the ladder has a 'climb-up' option instead of a 'climb-down' option smile.png

 

~apa

 

Thanks a million!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...