#(Shree) How to make a conversation between an NPC and a player?
71 messages · Page 1 of 1 (latest)
(Shree) How to make a conversation between an NPC and a player?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
First of all, did you go over the guide yet? it's the most important first step to learning Denizen scripting
!guide
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
ah alr, I'll try to figure it out
Make sure to try out the examples instead of just reading, it can really help with understanding everything
After that, feel free to post more information as to what you're trying to do here and we'd love to help
thanks
!c zap
core
zap (<script>) [<step>] (<duration>)
Changes the current interact script step.
Changes the current interact script step for the linked player.
The step name input should match the name of a step in the interact script.
The step name can be '*' to automatically zap to the default step.
If used inside an interact script, will default to the current interact script.
If used elsewhere, but there is a linked NPC with an assignment and interact, that NPC's interact script will be used.
For anywhere else, you must specify the script by name.
Optionally specify a duration. When...
Don't ping for help. https://denizenscript.com/discord_rules#rule3
"Pinging" refers to using an @ to alert somebody to your post.
Generally only ping somebody if your message is very specifically directed at them (meaning, only that person has anything to do with the information in your message, and it would be confusing who it was for without the ping).
If you're asking a question, please just make a forum post and ask.
If you have a bug report or a feature request, please just make a forum post about it.
If this is pulled up for you by a helper, your ping was unneeded.
If you're arguing about it, you're wrong.
my bad
^
Did you install the vscode extension for denizen scripts for vscode
!guide setting up your script editor
View the guide page 'Setting Up Your Script Editor' at: https://guide.denizenscript.com/guides/first-steps/script-editor.html
nvm
I figured it out
instead of writing
my_assignment:
type: assignment
actions:
on assignment:
- trigger name:click state:true
on click:
- chat "Hello <player.name>!"
I did
my_assignment:
type: assignment
actions:
on assignment:
- trigger name:click state:true
on click:
- narrate "Hello <player.name>!"
worked fine
Please do not post scripts to discord, they format oddly
use the pastesite instead
!paste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
can I make an if statement on an npc conversation?
like
if a person replies with "yes", say one thing, if replies with "no" other
if so, how
!guide interaction script
Did you mean to search for what do i do: interact scripts (partial)?
View the guide page 'What Do I Do: Interact Scripts (PARTIAL)' at: https://guide.denizenscript.com/guides/npcs/interact-scripts.html
utilizing assignment and interaction scripts can help you run specific script sections based on triggers and what players say or do
So, I've got this right.
john:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
interact scripts:
- johnconvo
johnconvo:
type: interact
steps:
1:
click trigger:
script:
- narrate "Sailor John: Ahoy! You look lost. Looking for something?"
- narrate "<element[§2Reply: §aYeah, I'm looking where I could find some fish.].on_hover[click to reply].on_click[/denizenclickable chat Yeah, I'm looking where I could find some fish.]>"
- narrate "<element[§2Reply: §aNo, I'm just wandering around.].on_hover[click to reply].on_click[/denizenclickable chat No, I'm just wandering around.]>"
- zap 2
2:
chat trigger:
1:
trigger: /Yeah/, I'm looking where I could find some fish.
script:
- wait 2
- narrate "Sailor John: Well, I've heard that there's this pirate selling fish, I suggest finding him."
- zap 1
2:
trigger: /No/, I'm just wandering around.
script:
- wait 2
- narrate "Sailor John: Ah, okay, have fun then!"
- zap 1
And it works fine
But
The chat trigger 1 doesn't work for some reason
The chat trigger 2 finishes up
But 1 doesn't
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
nvm, I fixed it
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@wooden forum