Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

RenJS

HTML5 Visual Novel creation made easy and free · By lunafromthemoon

Suggestion for highlighting already selected choices?

A topic by spritewrench created 53 days ago Views: 38 Replies: 5
Viewing posts 1 to 6

Hey, 

Wondering if you could suggest a method for "greying" out previously selected choices?  I have some ideas but ....

Developer

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!

I think within the same runs would be ideal.

Developer

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:

https://we.tl/t-hJkP7V29dQ

Hey!
Brilliant. I'll see if I can merge thins into my current build. 
Side-Note: How do I send you a steam key for the current project?  

Developer

tell me if you have any issue, and thanks, my steam account is sirystin