Skip to main content

On Sale: GamesAssetsToolsTabletopComics
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

How to get "always same dialog for a tile type"?

A topic by Akaki created Jan 22, 2024 Views: 198 Replies: 5
Viewing posts 1 to 3
(1 edit)

I'm using Bitsy Color.

For example, I have water tiles. I want them to always say "you can't swim" or whatever on any water tile for this one room. I know I can just make them as items, but then I will have water tiles clogging up the inventory list and on default the water will disappear when the player walks on them. How can I tell Bitsy to always display "you can't swim" for this one type of tile?

(I will continue to search for the answer myself and edit this post if I find an answer)

I know you don't want items in the inventory list, but the simplest way to do this is with items. 

If you make one invisible (aka no drawing), transparent item, set its dialogue to be "You can't swim." and put a bunch of those in front of the actual wall-set water tiles, it will look to the player like when they touch the water it is playing the dialogue. 

Maybe combine that with the permanent item hack so that the water narration can't be picked up and added to the inventory? 

https://github.com/seleb/bitsy-hacks/blob/v17.0.0/dist/permanent-items.js or choose Permanent Item Hack on Borksy

The other option would be to make your water tiles as sprites, which can't be walked through and do display dialogue, but you would have to duplicate enough sprites for each individual water tile that you need which seems like a hassle.

Thanks. I couldn't get the permanent item hack to work. I tried copy-pasting it into my code, tried using the patch editor on Bitsy Savior, and tried using Borksy (which just corrupts my game, it can't handle Bitsy Color, and also it gives me an error about "object destroyed" when I try to run it in Bitsy Savior without my Bitsy Color game data injected). I'll keep trying...

Yeah, unfortunately the hacks can be version dependent, which also means they don't work for all forks.  In the future, you may want to specify when you are asking for solution for a fork since the version numbers aren't always the same as the current vanilla Bitsy. 

But it sounds like Valeriy's suggestion should be pretty easy to implement, I hope it works for you!

I would have done it with exits: create an exit and set it to locked (room actions -> lock/unlock), then add a dialog to it and place where you want. You can even make it teleport the player to the previous tile, so it will appear as if the player steps back automatically when touching the water. For this just add a room action -> exit to the required tile

Thanks, that's a good idea. I couldn't get the permanent item hack that the other commenter suggested to work, so I will try exits coupled with sprites.