I’m doing like an info part so I want that after you choose somthing and read it the “next” button will bring you back to the previous page with all the info, how can I do that?
Also, I want the choice to be removed after you read it and return to the info screen
Put *label info
Before the menu then a *goto info after each ‘info’ block
thanks it worked
but how can I remove the choice after you read it?
Let’s say your choice is this:
*choice
#Read Info
*goto Info
#Play Game
*goto StartGame
You just have to do this:
*choice
*hide_reuse #Read Info
*goto Info
#Play Game
*goto StartGame
This way, your “Read Info” choice will dissapear after you use it. You could also write “*disable_reuse” instead of “*hide_reuse” so that the choice will still be there, but it will be greyed out and non-selectable by the player after the first use.
You can also use “*if (equation) #choice” and “*selectable_if (equation) #choice” if you want a bit more control over what enables and disables them.
For example:
You're having a business dinner.
*dinner_choice
*choice
*if ((player_is_drinker) and (has_not_had_drink)) #Have a drink.
*set has_not_had_drink false
*goto dinner_choice
#Order dinner.
*goto business_discussion
However, for simple info or extra choices that you want anyone to be able to pick and then have it disabled *hide/disable_reuse is probably better.
I decided I would ask one of my questions here instead of making a new thread, since it’s somewhat related to this topic.
Is it possible to script another radio button? Like the Next Button, but have it do something different, let me give an example:
(random story text)
*page_break
*back_break
The back break will allow you to revisit the previous scene in case you missed something, and the next button would have the same functionalties as normal, except there would be 2 buttons on the screen at once.
CoG has decided against adding a back button for their own games, so it’s a very low priority on programming. You can do something similar with choices and *goto/label/goto_scene, but coding in a button to go backwards would probably not work very well, it probably wouldn’t work with stats at all.
Thanks for the quick replies, really helped me
Reaperoa, you brought up the ‘if command’ subject and that’s my problem now.
how exactly does it work?|
how do I make the game “remember” choices the player made earlier?
btw,the link to your tutorial doesn’t work, if you could reupload it or somthing it’ll be great it was really helpful
Updated the link to my guide in its old thread. I guess I took it down intending to upload the next version but got distracted with RL. (I do remember dropping it because of RL, I just don’t remember taking the old version down.) Maybe I’ll take a final crack at it soon. Once I get the base it should be nothing more than just updating it with new versions. Do not that the version up is the one I’ve actually been working on, so I can’t really guarantee that it won’t suddenly start changing.
Anyways, if you want to use *if/selectable_if for #choices, just insert the *if onto the same line as the #choice, at the same spacing as the #choice would be.
Let me expand on my example:
You're having a business dinner.
*dinner_choice
*choice
*if (has_not_ordered_drink = true) #Have a soda.
*set has_not_ordered_drink false
You order a soda.
*goto dinner_choice
*if ((player_is_drinker = true) and (has_not_ordered_drink = true)) #Have a beer.
*set has_not_ordered_drink false
You order a beer.
*goto dinner_choice
#Order dinner.
*if has_not_ordered_drink
You just ask for water.
You order dinner.
*goto business_discussion
(I slightly modded the example for people that don’t know that you can just type a variable for an *if to check true/false if the variable is a boolean.)
Now this uses two variables: player_is_drinker (which would be determined by some earlier question about whether the player drinks alcohol, set to true if they do drink) and has_not_ordered_drink (which prevents the player from ordering both a beer and soda, plus gives an extra line where they order water if they don’t order a beer or soda). Also, (IIRC) the parentheses around the equations are necessary with an *if#choice.
Now, if you’re just giving extra information, you’ll probably just want to *hide_reuse as it’s a lot easier. I’d only recommend using an *if#choice if you’re doing something complex. I’m sorry it’s late, so if I may not be explaining how to use an *if#choice optimally. If you’re still having trouble I can try to clarify it a bit more tomorrow.