How to guarantee player gets every random event?

In my current game the player has the option to initiate a random event, 1 of several that are accessed via a *gosub_scene command. Is it possible to prevent the player from repeating the same event across multiple playthroughs?

I know CoG has the ability to track choices across playthroughs so that’s why I figured it might be possible.

You should be able to create an achievement for each event, and then check to see if the achievement has been earned before sending the player to the various scenes. If the achievement has been earned, you can *goto them back up to the number generator.

1 Like

That would have the problem that you wouldn’t have anywhere to go once you’ve seen them all… Is there any reason why the player needs to see every event?

1 Like

I guess you could make an *if gate such that if you have tripped each achievement, you are sent on your merry way–maybe a scene that only happens if you’ve exhausted the random stuff. But I see what you mean.

Well I would probably have enough content for at least 3 playthroughs and afterwards the events would just start back over.

You know, I have no idea whether there’s a way to set achievements to false, so that you could have the events start back over. Does someone know that?

I do know that depending on the platform, there’s a certain risk in tying in-game stuff to earned achievements. Certainly if you play on the web, clearing cookies will remove the achievements.

You’re right, it’s not possible. Instead you could use an if statement to check if all the achievements have been set, then randomly pick an event.

I do agree with Gower, however, in that using achievements is not ideal. They are not always reliable, and I don’t know why you’d need random events in the first place. Why not just allow the player to choose the event? Gives them more control, choice and you don’t have to worry about the technical side of things. Single playthroughs should be mostly self-contained in my opinion.

Yeah. Randomness is way more trouble than it’s worth, and the reader will barely notice.

The plot of the game revolves around an autonomous, growing world so the random events are meant to simulate the world developing on its own without your omnipresence.

I didn’t know there was a way to check achievements - to the point of asking and being told there wasn’t a way. Has this changed?

You use the aptly named function *check_achievements:

1 Like

That’s awesome! Thank you!