trainux Posted June 8, 2018 Share Posted June 8, 2018 (edited) According to my logic, this fragment should work to talk to an NPC of Tutorial Island. if(dialogues.inDialogue()) { if(!dialogues.isPendingContinuation()) { if(dialogues.clickContinue()) { dialogues.clickContinue(); } } }else { NPC tuto2 = npcs.closest("Survival Expert"); if(tuto2.isVisible()){ tuto2.interact("Talk-to"); }else{ getCamera().toEntity(tuto2); } } But in Tutorial Island the annoying messages appear that seem to dialogue with another NPC but they are not. I attach the image specifying the message to which I refer. https://photos.app.goo.gl/3ta5FZpqZNg8EfSM6 Edited June 8, 2018 by trainux Quote Link to comment Share on other sites More sharing options...
Explv Posted June 8, 2018 Share Posted June 8, 2018 (edited) Well firstly @trainux, don't check if getDialogues().inDialogue(), because as you said yourself, the player is always in a dialogue. Whenever you are talking to an NPC on the island the "Click here to continue" / "Click to continue" widget will be visible. So just check for that instead. Just look at my open source script https://github.com/Explv/Tutorial-Island Edited June 8, 2018 by Explv 1 Quote Link to comment Share on other sites More sharing options...
trainux Posted June 8, 2018 Author Share Posted June 8, 2018 2 minutes ago, Explv said: Well firstly @trainux, don't check if getDialogues().inDialogue(), because as you said yourself, the player is always in a dialogue. Whenever you are talking to an NPC on the island the "Click here to continue" / "Click to continue" widget will be visible. So just check for that instead. Just look at my open source script https://github.com/Explv/Tutorial-Island Your island code is free, I did not know, I will use it to guide me. Thanks brother. Quote Link to comment Share on other sites More sharing options...
Alek Posted June 8, 2018 Share Posted June 8, 2018 Quote NPC tuto2 = npcs.closest("Survival Expert"); if(tuto2.isVisible()){ tuto2.interact("Talk-to"); }else{ getCamera().toEntity(tuto2); } Don't write in camera code, interact does it for you. Also interaction event has specific requirements on whats visible or not, so its possible your script stalls forever. 1 Quote Link to comment Share on other sites More sharing options...