Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

Bitsy Game Maker

Make little games, worlds, and stories! (No coding required.) · By Adam Le Doux

Saying Variables?

A topic by masterminer176 created Feb 15, 2018 Views: 310 Replies: 3
Viewing posts 1 to 3

I want something in a dialogue to tell you how much of a variable you have, here's and example:

It's a gold goin! {rbw}+15 Gold!{rbw} {G = G + 15}
You now have {say {var g}} gold.

But instead of saying "You now have 115 gold." It instead says "You now have  gold." Am I typing something wrong? :(

Try using

{say {g}}

instead of

{say {var g}}

That worked for me. Though to be honest, I'm pretty new to using Bitsy myself, so that might not work in all situations

ah, makes sense!

Hey, sorry to bump an old thread, just posting here to help anyone who goes looking for help in the future.

The correct syntax would be:

{say g}

I believe when you are adding curly brackets around the variable name, you're just unnecessarily adding a nested code block for Bitsy to process. Probably doesn't hurt anything, but will save you time writing less characters.

I wrote up a tutorial about Bitsy Variables that should cover most basics like this:

https://ayolland.itch.io/trevor/devlog/29520/bitsy-variables-a-tutorial