Swisher Sweet 0 Posted December 8, 2023 Hi, I'm Currently experiencing a problem where there is two stairs back-to-back (only one tile in between) and i need my player to go up one side and down the other but instead he will go up one side and back down the same side. Is there any filter for me to apply? I'm fairly new to scripting so apologize if this is a stupid question. Thank you in advance, to whoever can help me out!
Pandemic 2853 Posted December 9, 2023 You can check the object's tile like this: GameObject stairs = GameObjects.closest(object -> "Staircase".equals(object.getName()) && tile.equals(object.getTile())); where tile would be a Tile of whichever one you want at the time.
Swisher Sweet 0 Author Posted December 9, 2023 19 minutes ago, Pandemic said: You can check the object's tile like this: GameObject stairs = GameObjects.closest(object -> "Staircase".equals(object.getName()) && tile.equals(object.getTile())); where tile would be a Tile of whichever one you want at the time. Your awesome man, thank you so much. Say I didn't want to call the closest staircase, and I wanted to give tile cords, that would be inserted like this tile.equals(1234,1234,0) or this tile.equals(object.getTile(1234,1234,0))?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now