You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
So I wanted to try my hand at scripting a scenario and I made a test script based off of the default script for all scenarios. The first two are the test I guess "Scenes" as I referenced them in my script, and the third one is the control. The modified text showed up at first but when I reloaded my script, it stopped displaying the modified text and just displays the input text.
This is my script:
const Scene1 = (text) => {
let modifiedText = text
const lowered = text.toLowerCase()
if(lowered.includes('you are not king') || lowered.includes('you are no longer king')) {
state.isKing = false
console.log('Player is no longer the king!')
modifiedText = text + '\nYou are no longer the king!'
}
return { text: modifiedText }
}
Scene1(text)
const Scene2 = (text) => {
let modifiedText = text
const lowered = text.toLowerCase()
if(lowered.includes('you are king') || lowered.includes('you become king')) {
state.isKing = true
console.log('Player is the king!')
modifiedText = text + '\nYou are the king!'
}
return { text: modifiedText }
}
Scene2(text)
const Scene3 = (text) => {
let modifiedText = text
const lowered = text.toLowerCase()
So I wanted to try my hand at scripting a scenario and I made a test script based off of the default script for all scenarios. The first two are the test I guess "Scenes" as I referenced them in my script, and the third one is the control. The modified text showed up at first but when I reloaded my script, it stopped displaying the modified text and just displays the input text.
This is my script:
const Scene1 = (text) => {
let modifiedText = text
const lowered = text.toLowerCase()
if(lowered.includes('you are not king') || lowered.includes('you are no longer king')) {
state.isKing = false
}
return { text: modifiedText }
}
Scene1(text)
const Scene2 = (text) => {
let modifiedText = text
const lowered = text.toLowerCase()
if(lowered.includes('you are king') || lowered.includes('you become king')) {
state.isKing = true
}
return { text: modifiedText }
}
Scene2(text)
const Scene3 = (text) => {
let modifiedText = text
const lowered = text.toLowerCase()
if(lowered.includes('control line') || lowered.includes('controlled line')) {
state.isKing = true
}
return { text: modifiedText }
}
Scene3(text)
The text was updated successfully, but these errors were encountered: