How to make a Chatbot
id: 749308
category: Advanced Topics
posts: 2
blah_blahYa
loading
Here is the basic code to start a Chatbot like mine: https://scratch.mit.edu/projects/963425025
This is the very basic code to get started, I hoped it helped.
when green flag clicked
say (join [Hi ] (join (username) [, I am (chatbot name) how can I help you?])) for (2) secs
forever
ask [] and wait
if <(answer) contains [hi] ?> then
say [hi]
else
if <(answer) contains [time] ?> then
say (join [The time is ] (current [time])) for (2) secs
else
say [Sorry, I didn't understand.] for (2) secs
end
end
end
This is the very basic code to get started, I hoped it helped.
Paddle2See
loading
It's really nice that you want to help out with a guide! However, we have a number of them in the forums already and we don't have a good way to showcase any more. If you want to make a guide in a Scratch project, that would be fine. You could advertise it in the “Show and Tell” section too.
There are lots of other ways to help out in the forums too. Helpful Scratchers are always welcome in the “Questions About Scratch”, “Help With Scripts”, “Requests” and other sections. Just look around and ask questions
There are lots of other ways to help out in the forums too. Helpful Scratchers are always welcome in the “Questions About Scratch”, “Help With Scripts”, “Requests” and other sections. Just look around and ask questions