SuippoKala Posted May 1, 2016 Posted May 1, 2016 if (npcs.closest(npcChompyBirdAlive) != null){ return State.KILL_CHOMPY; How do i make it so that it checks when there is an item on the ground, return to state KILL_CHOMPY; ?
Explv Posted May 1, 2016 Posted May 1, 2016 (edited) if (npcs.closest(npcChompyBirdAlive) != null){ return State.KILL_CHOMPY; How do i make it so that it checks when there is an item on the ground, return to state KILL_CHOMPY; ? if(getGroundItems().closest("whatever") != null){ return State.PICK_UP_ITEM; } else if(getNPCs().closest(npcChompBirdAlive) != null){ return State.KILL_CHOMPY; } Edited May 1, 2016 by Explv 1
SuippoKala Posted May 1, 2016 Author Posted May 1, 2016 if(getGroundItems().closest("whatever") != null){ return State.PICK_UP_ITEM; } else if(getNPCs().closest(npcChompBirdAlive) != null){ return State.KILL_CHOMPY; } It works, thank you so much !