Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
How to make NPC interact with only the first player to click on it

So, the below code gives the dialogue whenever a player clicks on it. What I want is to update it to make it give the hint only to the first player to click it. The player must be able to get the hint every time he clicks on the NPC but other players should not be able to get the hint.

var switch_name = npc.Id();

function init(hr, min, sec) {
    npc.setName("Seth");
};

function touch(player) {

};

function action(player) {
    var dialog = lib.dialog(player);
    dialog.talk("The hint is 1234");
    player.setSwitch("Seth ID", true);
    dialog.send();
};
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda