Gizmo301 Posted October 13, 2015 Share Posted October 13, 2015 Does anyone know/has anyone used a method that checks whether a GroundItem is reachable or not? For example clicking something that's on the other side of a closed door should say "I can't reach that!" does anybody know a method that recognises the player cannot reach the item? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 13, 2015 Share Posted October 13, 2015 GroundItem g = groundItems.closest("bobrocket is a nub"); if (g != null && g.exists() && map.canReach(g)) { //blah } apa 4 Quote Link to comment Share on other sites More sharing options...
Gizmo301 Posted October 13, 2015 Author Share Posted October 13, 2015 GroundItem g = groundItems.closest("bobrocket is a nub"); if (g != null && g.exists() && map.canReach(g)) { //blah } apa map.canReach() just what I was looking for, thanks!! 1 Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted October 13, 2015 Share Posted October 13, 2015 GroundItem g = groundItems.closest("bobrocket is a nub"); if (g != null && g.exists() && map.canReach(g)) { //blah } apa 1 Quote Link to comment Share on other sites More sharing options...