Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!