s9ey8 kek68 9d8bf 6968a hk6f8 rt7n2 862br zrz9h t8nsa zkarh b3z77 tknr4 bny4s ak7zi eehyz if8i2 fkk6h hkz25 k3f8r 285ty b33ki trouble with cyoa text game |

trouble with cyoa text game

2021.12.02 23:29 Informal-Drive2294 trouble with cyoa text game

Tring to adapt someone else's code (https://www.youtube.com/watch?v=R1S_NhKkvGA&t=1s) to create an old fashioned choose your own adventure text game using js with an interconnected decision tree lattice of branching scene nodes. However, I hit a bug where I can't get the scene node progression to randomly select one option from many. It always defaults to the first available one. Ie., nextscene: 1 will work, but nextscene: 1||2 (and variants thereof) does not work

const textElement = document.getElementById('text')
const optionButtonsElement = document.getElementById('option-buttons')

let stateItem = {}

function startGame() {
stateItem = {}

function showSceneNode(sceneNodeIndex) {
const sceneNode = sceneNodes.find(sceneNode => sceneNode.id === sceneNodeIndex)
textElement.innerText = sceneNode.text
while (optionButtonsElement.firstChild) {

sceneNode.options.forEach(option => {
if (showOption(option)) {
const button = document.createElement('button')
button.innerText = option.text
button.addEventListener('click', () => selectOption(option))

function showOption(option) {
return option.requiredStateItem == null || option.requiredStateItem(stateItem)

function selectOption(option) {
const nextSceneNodeId = option.nextScene
if (nextSceneNodeId <= 0) {
return startGame()
stateItem = Object.assign(stateItem, option.setStateItem)

const sceneNodes = [
id: 1,
text: 'You wake up in a dark house. Your head hurts. You see three dusty vials discarded on a broken table.',
options: [
text: 'Take the blue vial.',
setStateItem: { blueVial: true },
nextScene: 2 //this works fine
text: 'Take the red vial.',
setStateItem: { redVial: true },
nextScene: 2 || 3 //not a prayer
text: 'Take the green vial.',
setStateItem: { greenVial: true },
nextScene: 2 || nextScene: 3 //still nope
text: 'Leave the vials alone.',
nextScene: 4 // works fine
submitted by Informal-Drive2294 to learnjavascript [link] [comments]

2021.12.02 23:29 musicfan2019 Haley K Turner Releases Hanukkah Song Dedicated to Adam Sandler

Haley K Turner Releases Hanukkah Song Dedicated to Adam Sandler submitted by musicfan2019 to VancouverMusic [link] [comments]

2021.12.02 23:29 jibbinbuddha Qué va a suceder con las armas traumaticas?

Compré una pistola automática al inicio de la pandemea. Escuché que ya las van a quitar, pero no sé
submitted by jibbinbuddha to Colombia [link] [comments]

2021.12.02 23:29 BlangusClangus iPhone 13 pro for iPhone SE trade in

I recently got the promo for $800 off the 13 pro for my SE.
How long do I have to trade in my old phone and still keep my promotional credit? Vzw chat person said it doesn’t matter when. It can be after Christmas.
It was ordered on nov 19, arrived nov 23. But in my account it still says the phone hasn’t shipped yet.
A lot of moving parts here but don’t want to lose my promotion. However I was hoping to wait until Christmas to send my trade in in.
submitted by BlangusClangus to verizon [link] [comments]

2021.12.02 23:29 fribird7 27 [M4F] Hello. Looking for a new friend to chat about anything with and have fun.

As the title says, looking for a new friend to chat and have fun with. Can chat about anything just as long as we are both enjoying the conversation.
I'm 27. I have cats and will show them off if you wanna see them. I work full-time in IT, enjoy Netflix, and playing a few games. I play poker but haven't really this past year.
Send me your kik if you're interested in chatting. Have a good one.
submitted by fribird7 to Kikpals [link] [comments]

2021.12.02 23:29 Inner_Vast Trust wallet holders

submitted by Inner_Vast to trustwalletcommunity [link] [comments]

2021.12.02 23:29 chatshitgetbanged24 [Sell] Trying to loosen up my collection a bit. Classic Reebok authentic home jersey (size 46) in brand new condition~$150 USD shipped anywhere in North America or best offer

submitted by chatshitgetbanged24 to BlueJackets [link] [comments]

2021.12.02 23:29 ImmediateGroup7092 Got my first Castform (sorry I play in Spanish)

Got my first Castform (sorry I play in Spanish) submitted by ImmediateGroup7092 to MandJTV [link] [comments]

2021.12.02 23:29 amnesiac7 '1/6 Truthers': MSNBC's Ari Melber on MAGA's loser lies

'1/6 Truthers': MSNBC's Ari Melber on MAGA's loser lies submitted by amnesiac7 to January6 [link] [comments]

2021.12.02 23:29 mcj92846 Why do so many people on Grindr move to Snapchat? Weird for me to not do that without meeting them?

I would just rather keep the convo on Grindr unless we meet and like each other. But some people ask for snap after 2 messages and a nude exchange haha. You guys think it’s weird for me to not want to exchange snaps so quickly?
submitted by mcj92846 to askgaybros [link] [comments]

2021.12.02 23:29 GranolaColonizer WTT 3/20/15 pc and psn

WTT 3/20/15 pc and psn submitted by GranolaColonizer to D2R_Marketplace [link] [comments]

2021.12.02 23:29 Southernbeauty0507 28 weeks pregnant

submitted by Southernbeauty0507 to ClothedPreggo [link] [comments]

2021.12.02 23:29 burning_dawn Avoiding shutdown, Congress approves bill to fund government through Feb. 18

Avoiding shutdown, Congress approves bill to fund government through Feb. 18 submitted by burning_dawn to politics [link] [comments]

2021.12.02 23:29 Xalbana They prefer tongue

submitted by Xalbana to AnimalsBeingDerps [link] [comments]

2021.12.02 23:29 AsianBabes00 Apink - Naeun

Apink - Naeun submitted by AsianBabes00 to kpics [link] [comments]

2021.12.02 23:29 StrachNasty Dalton Schultz is down for the Cowboys.

submitted by StrachNasty to fantasyfootball [link] [comments]

2021.12.02 23:29 PM_ME_UR_LAST_DREAM Danish model Winnie Holman 🇩🇰

Danish model Winnie Holman 🇩🇰 submitted by PM_ME_UR_LAST_DREAM to Danishes [link] [comments]

2021.12.02 23:29 Eilanzer Monk mains right now~

Monk mains right now~ submitted by Eilanzer to ffxiv [link] [comments]

2021.12.02 23:29 svanapps r/cardano - I created a social media website where you can talk about Crypto, and NFTs in one place. I worked really hard on this and would love to hear your feedback!

cardano - I created a social media website where you can talk about Crypto, and NFTs in one place. I worked really hard on this and would love to hear your feedback! submitted by svanapps to CryptoToFuture [link] [comments]

2021.12.02 23:29 rn271208 Meter Pitching Struggle

Hey everybody, just wanted to ask, if you throw on meter, do you ever have times where perfect releases throw the ball down the middle no matter where you put the target? I’ve had a couple of games in a row where the ball will not go anywhere but down the middle and obviously it hasn’t gone well. Any tips other than switch to pinpoint? Thanks in advance.
submitted by rn271208 to MLBTheShow [link] [comments]

2021.12.02 23:29 Prestigious_Big_5817 New and Unique Rolling Pins

New and Unique Rolling Pins submitted by Prestigious_Big_5817 to DnDIY [link] [comments]

2021.12.02 23:29 coljavskiyi ✊$RoninGamez – Just got listed in CMC! ⭐ | ⚡ Launching Now on BSC | All NFTs will be out made by lead dev ❤Alex Lopez – in charge of Magic the Gathering, NBA 2k, NFL 2k☀︎ | Revolutionary gaming and NFT eco-system | ☄︎ Liquidity Lock | ☑︎Next x100

Join the bullrun! $RoninGamez is currently on upstreak as they got listed on CMC
Get into the community to experience the upcoming utility presentation
Waste no time and take hold of the precious $RONINGMZ tokens while they are still hot!
☘︎Where to buy? Pancakeswap with 8% slippage! ☠︎
✖ What is Ronin Games?
Ronin Games is a multi-player gaming and NFT ecosystem created to revolutionize the field of Parimutuel betting.
Ronin Gamez is building a platform to bring together the best aspects of Crypto, Gaming, NFTs & Betting. The RONIN token will serve as the native utility token on the platform, being used for, but not limited to, interacting with the games by purchasing upgrades & NFTs, betting, voting/governance, staking and more.
♾ Who is their main dev? He is a world know figure in the gaming world!
His main lead gaming developer is – Alex Lopez. He was responsible for major computer video games like “Magic the gathering”, “NBA 2k”, “NFL 2k”.

❤️Tokenomics - Roninomics:
☝️Total Supply: 100,000,000
☝️Tax -6%: 2% Auto liquidity, 4% Marketing
☝️Secure – Time base tokenism solve anti-pump and dump, paper hands, sniper bots
☝️Robust – Airdrop rewards for diamond holders
♻⛩️Total Distribution:
♨️ Private Sale – 20%
♨️ Pre-Sale – 40%
♨️ Liquidity – 14%
♨️ Airdrops – 10%
♨️ Staking – 6%
♨️ Team – 10%
✈️Contract Address: 0xC6ac148250736a67E84864Eae2B45A8a81D9e163
❄️ Join the community and feel the great vibe!
Ronin Games’ team have given you a wide variety of social platforms that you can engage with and communicate with other people in the project. Right there you can contact the team and ask them anything you feel like it! I have done it myself and they are flawless in their response.
♟️ Website: https://roningamez.in/
✉️ Telegram: https://t.me/RONINGMZ
☎️ Twitter: https://twitter.com/Roningz
submitted by coljavskiyi to MarsWallStreet [link] [comments]

2021.12.02 23:29 navel_buffet 🐕🔥Wildfire Inu! || 🔒 5 YEARS Liquidity Locked || 20% Burned on Every Transaction || 1% Reflections || 2% Liquidity

23% Buy/Sell Tax ➡️ 🔥20%🔥 of every transaction is burned forever ➡️ 1% of every transaction is reflected back to holders ➡️ 2% of every transaction is added to liquidity for price stability ca: 0x1b3c385c8c64ce8a512a7c041246f1cb2156bac8 https://t.me/wildfireinu 🔒Liquidity Locked for 5 Years!🔒 https://deeplock.io/lock/0xa7D142d0382DdB1bBBBC3397553e5C1EDA7946F6 
submitted by navel_buffet to CryptoMoon [link] [comments]

2021.12.02 23:29 PrettyPenguin07 CarPlay on a ‘11 SRX?

Does anyone know of a way to get Apple CarPlay on a ‘11 SRX? Would love to be able to use Waze (in safer manner than glancing at my phone while driving) or a more updated navigation since the Maps hasn’t been supported for years.
submitted by PrettyPenguin07 to Cadillac [link] [comments]

2021.12.02 23:29 Grimhof First book on new kindle!

Processing img n35s8tswn8381...
submitted by Grimhof to kindle [link] [comments]