Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

bitsy

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

randomized variables for rooms?

A topic by bambuloid created Aug 23, 2024 Views: 129 Replies: 1
Viewing posts 1 to 2

Hi guys! Is it possible to make randomized variables (e.g. a number from 1-10) to be used with exits? For example, the computer generates variable a = 5, and if a=5 then a room loads with an npc in it, but if a = 1, the room doesn't have an npc in it. Is something like this feasible?

Hi  bambuloid! As far as I know you have to make two rooms, identical except for the NPC presence. Then when you reach the exit if the random variable is 5 you will teleport to the room with the NPC, otherwise to the one without it! Hope is what you were looking for! ✨