Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

bitsy

a little engine for little games, worlds, and stories · By adam le doux

Using a variable in place of a room ID?

A topic by earthan created 41 days ago Views: 66
Viewing posts 1 to 1
(1 edit)

What I want to do is, inside an Exit, substitute out the target room's designation, for a variable. something like

{exit roomID 6 16}

And then the variable 'roomID' holds the target room's ID number, which can then be changed so I can redirect exits without writing a bunch of if/then branches.

So far, this *almost* works; it changes to the correct room, but fails to place the Avatar anywhere in the new room, so the game becomes inoperable. I noticed the same thing happens if you format it like {exit 0 6 16} (forgetting the "" around the room number) so I thought "roomID" might work, but no luck so far.