This forum is for discussing anything related to The Quest editor.
Post a reply

"Swap" NPCs on an object

Thu Dec 24, 2020 10:41 pm

I wish to know if it is possible to "change" an NPC on a door.
Here's the deal: I want to have a shop NPC during the day, but during the night change it with a non-shop NPC.
My theory is: Script the object that once used, check the time, if it is during the night, make the player talk to another npc instead of going to the store that will be closed at night, if not "default". :geek:
In theory is easy put everytime i tried, the spaghetti code that i wrote made the Editor explode. :oops:
Help?

Re: "Swap" NPCs on an object

Sun Dec 27, 2020 5:55 pm

Set the shopkeeper as the default NPC for the door then put this code on the door:

if(evtuse())
{
if(isNight())
talknpc("NPC id here");
else
default();
}

Re: "Swap" NPCs on an object

Thu Jan 14, 2021 11:39 pm

KGold wrote:Set the shopkeeper as the default NPC for the door then put this code on the door:

if(evtuse())
{
if(isNight())
talknpc("NPC id here");
else
default();
}

Thank you :D
Post a reply