Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

I noticed a glitch -- rollback seems to not revert the booleans, so if you test out multiple options when given a choice, roll back, and pick something else, the game seems to think you did something you didn't actually do. (At least, I'm assuming they're booleans. If they're not, and you're actually using an immutable data type, that's probably the issue :P)

Oh, thanks for the feedback! I didn't use any booleans, everything is just "if" statements. That was the glitchy shit I was talking about, but I have no idea how to fix it atm. If you have any suggestions I am all ears. ^^

(1 edit)

Oh, ok. Bear in mind I'm fairly new to programming, but my understanding is that generally when there's a more permanent change to game state (i.e. across multiple scenes and not just the next scene) the programmer will set a variable that defaults to False and cause the game to change it to True when an event triggers it. For example, you can create a boolean variable called "talked_to_Alex", with default value of False, and part of the code for when you click on the appropriate choice is "talked_to_Alex = True". Then later any code that needs to reference that event can use "if talked_to_Alex:".

I did something similar, but instead of using True/False statements I made it so certain events would trigger if values of certain variables were equal to or higher than a given number... Guess it didn't work super well.