Update README.md

This commit is contained in:
Nick Walton 2020-05-23 21:59:43 -06:00 committed by GitHub
parent 94b8efa7f9
commit 1fc240c280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1 +1,16 @@
# Scripting
# Scripting
### Input Modifier
Called each time the player gives an input and has the opportunity to modify that input.
### Output Modifier
Called each time the model generates an output and has the opportunity to modify that output.
### State
The `state` variable can be used to store information that's persistent across function calls. The state.memory.context value will be added to the games memory if it exists
### Console
`console.log("Some message")` will log messages that you can see in the scripting console
### Utils
`const questCompleted = await utils.checkQuestCompleted({history, quest, text})` can be used to check whether a quest was completed.