Gizmo301 Posted October 13, 2015 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!
Apaec Posted October 13, 2015 Posted October 13, 2015 GroundItem g = groundItems.closest("bobrocket is a nub"); if (g != null && g.exists() && map.canReach(g)) { //blah } apa 4
Gizmo301 Posted October 13, 2015 Author 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
Bobrocket Posted October 13, 2015 Posted October 13, 2015 GroundItem g = groundItems.closest("bobrocket is a nub"); if (g != null && g.exists() && map.canReach(g)) { //blah } apa 1