Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Bitsy Game Maker

Make little games, worlds, and stories! · By Adam Le Doux

struggling with variables

A topic by jbradleywrites created Mar 06, 2018 Views: 572 Replies: 14
Viewing posts 1 to 6

Hi all,

I'm new to Bitsy and I'm struggling in creating variables. Trying to create one where when a player has all four items, it triggers a specific ending when the user goes to the ending point. Suggestions would be incredibly helpful.

(1 edit)

I think you could use hidden item which contain the ending text. Also place an exit on the same tile to teleport the player to the exit room. The end room could be a room with word The End on it. Hope this helps

But how do you make it so that the text displays before you are sent to the new room? I've been trying to do this and every single time, the "room exit" occurs before the text.

May be check this

I think the best practice for accomplishing this without hacks is two steps:

  1. Hidden item before exit that performs the logic to see which ending text the player should be shown. This item stores the ending text to a variable.
  2. Ending displays appropriate ending text using 'say'

I wrote a tutorial which covers this and variables in general:


I'm working on a game with a similar mechanic, but it's been fiddly to implement.

You could try creating a variable for the total number of items and add one to it each time the player picks up an item. Then at the ending point, create a sprite or an item with conditional dialogue that checks the value of that variable and use the end from dialogue Bitsy hack to set the ending based on the total number of items.

How do I write a variable, though?

using the inventory tab :)

That answers a "what do I use to write variables" question. What I really need to know is how one writes variables in the platform. There aren't clear instructions on how to do so in Bitsy.

you mean show their value in the text if that is the question then use that {say VarName} in the text.

I think I need an example or a step by step to understand it. If there is one that’s clear that you can refer me to, I’d love to read it. 

Check these links. they might not be the best tutorials but they might help :)

thanks for the links. I shall check them out. 

Aye. The cephalopodunk tutorials are the best.

Hey,  just in case anyone is poking around this thread in the future for answers about variables,  wrote a tutorial covering all this: