Hey,
Wondering if you could suggest a method for "greying" out previously selected choices? I have some ideas but ....
HTML5 Visual Novel creation made easy and free · By
I think we can work out something. Do you mean previously selected as in previous games or in the same run when you enter the same scene? The basic idea would be to keep the choices in a user variable (RenJS.logicManager.vars) so that they are saved along the story progress. Then the GUI would have to read this list and greying out the options (could be with a different sprite or by adding a tint to the button). If you want to keep the greyed out options between different runs, it would have to be saved in a different way, but it shouldn't be so hard.
Let me know what are your specific needs and I'll help you implement it.
Cheers!
Hello again,
It wasn't so hard to implement after all, and it's a great feature, so I merged it in the RenJSQuickstart.
Here's the changelog:
https://gitlab.com/lunafromthemoon/RenJSQuickstart/commit/ec72edca5b18dac66bf7d4...
You can pull again all the libraries from the Quickstart or add the changes manually (I recommend this since the changes are not that big and are mostly in the SimpleGUI.js file, in the changelog you have to add the things in green and remove the things in red)
Another change is adding the option logChoices in config.js, like so:
logChoices: true
And finally, here's the story that goes with the new code:
start:
- play morningBGM:
- show room: WITH FADE
- text: Hello World
- scene: recurrentScene
recurrentScene:
- text: What are you going to do?
- choice:
- Do this:
- text: You do this
- scene: wrongAnswer
- Do that:
- text: You do that
- scene: wrongAnswer
- Do something else:
- text: You do something else
- scene: wrongAnswer
- Do nothing:
- text: You do nothing
- scene: lastScene
wrongAnswer:
- text: Wrong answer
- scene: recurrentScene
lastScene:
- text: Finally
I never know if I'm being clear enough, but here's a demo: