Jump to content

Recommended Posts

I am looking for a simple way to determine whether the player is in overworld, caves, or ruins. The only function that I have found is GetGroundType() using all available types.

 

Anyone know an easier way of doing this?

 

Thanks in advance,

 

Prof

Edited by ProfFarnsworth

As debugman18 said,

To check if in cave:

GetWorld().prefab == "cave"orGetWorld():HasTag("cave")
To check if in ruins (note: the above checks also evaluate to true while in the ruins):

GetWorld():HasTag("ruin")
To check if in overworld:

GetWorld().prefab == "forest"ornot GetWorld():HasTag("cave")
Edited by squeek

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
×
  • Create New...