Skip to main content

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

Oh, ok. Thanks. That worked. I'm pretty bad at programming, so wrapping my head around where and how to actually use the functions without just crashing the program is doing me in.

I have one more question. Using the method for sound you posted earlier, is there a way to get a sound to play when a room loads. I've gotten sound to play for the keyboard like you used for the demo, but I can't figure out how I'd get it to play when a room loads. I discovered by accident that putting it under "onLook" work, but that's only for when the player issues the look command for the room (which is actually kind of cool and I will end up using, but isn't what I need.)

Similar to how there is an onLook callback, rooms also have an onEnter callback that fires when the player enters the room. If you attach an onEnter method to your room and call playSound inside it, that should do what you’re wanting.

Thanks. That does what I wanted. It was in the readme too, and I somehow missed it.

You bet, no problem.