<npc.name> tag in world script
<npc.name> tag in world script
Hey guys,
I am trying to make an inventory menu that narrates some stuff after choosing an option.
I've made a format script with <npc.name> tag but it couldn't be filled in that world script (on player clicks TestGUI_menu_yes in TestGUI_menu:).
Is there an option how to determine how the <npc.tag> has to be filled in that world script so that I wouldn't have to write the name manually?
Here is the script for better undestanding:
https://pastebin.com/rDMNxYHH
I am trying to make an inventory menu that narrates some stuff after choosing an option.
I've made a format script with <npc.name> tag but it couldn't be filled in that world script (on player clicks TestGUI_menu_yes in TestGUI_menu:).
Is there an option how to determine how the <npc.tag> has to be filled in that world script so that I wouldn't have to write the name manually?
Here is the script for better undestanding:
https://pastebin.com/rDMNxYHH
Re: <npc.name> tag in world script
I came up with this:
https://pastebin.com/DPZYdL8p
Doesn't seem to be very effective... (it works tho)
https://pastebin.com/DPZYdL8p
Doesn't seem to be very effective... (it works tho)
- mcmonkey
- Site Admin
- Posts: 299
- Joined: August 5th, 2016, 7:27 pm
- Location: Los Angeles, California, USA
- Contact:
Re: <npc.name> tag in world script
You could add to the narrate commands an NPC argument, of the form like
npc:<server.flag[relevantNPC]>
Denizen lead developer. On Discord as
mcmonkey#6666
.Re: <npc.name> tag in world script
How exactly? I haven't met with that yet.
I assume I should flag that NPC at the start of the interact script
I assume I should flag that NPC at the start of the interact script
- mcmonkey
- Site Admin
- Posts: 299
- Joined: August 5th, 2016, 7:27 pm
- Location: Los Angeles, California, USA
- Contact:
Re: <npc.name> tag in world script
Assign a flag with the value "<npc>" while it's available, however/whenever/wherever needed to track it correctly. Then just use that argument mentioned above on the end of any command that needs it, with
npc:
and then a tag that will read the flag.Denizen lead developer. On Discord as
mcmonkey#6666
.Re: <npc.name> tag in world script
Code: Select all
npc:<server.flag[relevantNPC]>
- mcmonkey
- Site Admin
- Posts: 299
- Joined: August 5th, 2016, 7:27 pm
- Location: Los Angeles, California, USA
- Contact:
Re: <npc.name> tag in world script
That shouldn't be returning a true/false at all...
It returns whatever value you put in it. In this case you'd be putting an NPC object in it.
It returns whatever value you put in it. In this case you'd be putting an NPC object in it.
Denizen lead developer. On Discord as
mcmonkey#6666
.Re: <npc.name> tag in world script
Okay, I have put there npc:[email protected], works fine - is it better to use the server flag?
- mcmonkey
- Site Admin
- Posts: 299
- Joined: August 5th, 2016, 7:27 pm
- Location: Los Angeles, California, USA
- Contact:
Re: <npc.name> tag in world script
... Yes. It is better to use the flag.
Denizen lead developer. On Discord as
mcmonkey#6666
.Re: <npc.name> tag in world script
I mean, I still have to put it on the end of every narrate command (as written above)
Who is online
Users browsing this forum: No registered users and 1 guest