Yup.
Nailed it
Edit: Wait. No
It should be
*disable_reuse #Boost stat
texttexttext blablah
*goto test
Just use the </>
button (or Ctrl + Shift + C. A Shift-ed copy)
Yup.
Nailed it
Edit: Wait. No
It should be
*disable_reuse #Boost stat
texttexttext blablah
*goto test
Just use the </>
button (or Ctrl + Shift + C. A Shift-ed copy)
If you want to go back to the top of the choice, youāll need something like this (assuming you have *create my_stat 50
in startup, or something like this):
*label test
*choice
#Choice One.
Text here blah blah.
*goto something_else
#Choice Two.
Some text here too, blah blah.
*goto something_else
*disable_reuse #Choice Three, which changes your stats.
*set my_stat %+20
Text here blah blah. Your 'my stat' is now higher! Woo! It equals ${my_stat}.
*goto test
*label something_else
The test
label needs to go above the *choice
, or it will cause a bug. And if you use *choice
and not *fake_choice
, all the options will need to have a *goto
included as well.
Iām sure I know the answer to this but just for my info: When I have the disable and choice on the same line itās color coded like a long command and ignores the choiceās color (CSIDE). Iām assuming that this is normal and that the compiler wonāt care, correct?
@CJW or maybe @Vendetta can confirm, but yes, thatās just part of CSIDEās current syntax highlighter settings. Everything should be fine. (That said, if it does bring up an error when you run Quicktest, Iām sure the community would be happy to help figure out why! But it should work as given, I think.)
It is a percent bar, actually. But it still seems like I should be able to change the displayed name with a variable, right?
I am trying to work around variables, as they have not come up much. I need to do one to determine which MC the player selected. Right now I am trying to do *if Alexi true for the Alexi branch and *if Alexi false for the Fiorella one. Is that way off base? And is it possible once I create those variables on startup and have them set by which choice the person makes between the two MCs to have it in the percent bar to say *if Alexi true Dumb Luck and *if Alexi false Mantra? I have tried it several ways with no success.
Variables normally should be numeric for ease of use.
*create Alexi = 0
*set Alexi = 1 for the Alexi branch, *set Alexi = 2 for Fiorella
For the stats page:
*if Alexi =1 then
*stats_chart Dumb_Luck
*else
*stat_chart Mantra
and in start up you create both Dumb_Luck and Mantra
This should work.
@hustlertwo Did you want to use the same variable for both characters, only displaying under a different name? If so, you could also try this (I used āshared_statā since I didnāt know your variable name):
*if (alexi)
*stat_chart
percent shared_stat Dumb Luck
*if (alexi = false)
*stat_chart
percent shared_stat Mantra
Would that suit?
There are some examples on this page of various ways to style up your stat screen.
Then it will look like this for Alexi:
And this for Fiorella:
I tried this but as soon as I put *create Alexi = 0 I got this warning: invalid create instruction, value must be a number, true/false or a quoted string: Alexi = 0
@Fiogan Yes, the same stat just displayed differently sounds about right. I also need it to briefly display just as Special in the intro before the character is selected.
So you could either use another variable (I like true/false booleans myself if I mostly have an either/or situation, makes it easier for me not to get confused), or use @Eiwynnās number solution.
Like so, with true/false and an extra variable for the intro:
*create alexi true
*create still_special true
*if (still_special)
*stat_chart
percent shared_stat Special
*if (still_special = false)
*if (alexi)
*stat_chart
percent shared_stat Dumb Luck
*if (alexi = false)
*stat_chart
percent shared_stat Mantra
Or like so, with numbers as @Eiwynn suggested:
*if (alexi = 0)
*stat_chart
percent shared_stat Special
*if (alexi = 1)
*stat_chart
percent shared_stat Dumb Luck
*if (alexi = 2)
*stat_chart
percent shared_stat Mantra
The format for creating a number variable is:
*create alexi 0
without the equal symbol.
If I do not use the equal sign in creating the variable, would that still be the case when setting it, so it would be *set alexi 1 instead of *set alexi = 1? Or is it *set alexi =1?
*set alexi 1
is correct, yes. The equal sign is more for checks, such as (for instance):
*if (alexi = 1)
*goto alexi_dialogue
@IronRaptor absolutely fine, though I can see why youād be cautious. Itās an open debate whether we should be colouring it as a command or an option.
This has actually come up in my game as well, except itās where I let the player pick any two out of the five or six options, and then time is up. I can see from this code how to get them back to start with the option greyed out, but how then to make each option also able to take them to the next part of the story if it is the second one selected?
Sorry, I forget replies donāt automatically quote posts for some reason on here. Itās in reference to post 82 or so, regarding disable_reuse.
A timer! I love timers. I just coded one the other day actually for an exploring sequence. (If you use them in more than one scene, you can *create
it in startup instead, just remember to reset the timer to zero once you move out of the timed sequence.)
*temp my_stat 50
*temp timer 0
*label test
*choice
*disable_reuse #Choice One.
*set timer +1
Text here blah blah.
*if (timer = 1)
*goto test
*else
*goto something_else
*disable_reuse #Choice Two.
*set timer +1
Some text here too, blah blah.
*if (timer = 1)
*goto test
*else
*goto something_else
*disable_reuse #Choice Three, which changes your stats.
*set timer +1
*set my_stat %+20
Text here blah blah. Your 'my stat' is now higher! Woo! It equals ${my_stat}.
*if (timer = 1)
*goto test
*else
*goto something_else
*label something_else
I have a question:
Is it possible to use a variable to create a different goto address?
For example:
In startup
*create note ""
*create happy false
In the game:
*if (happy)
*set note "smile"
*goto blah_blah
*else
*set note "frown"
Then later in the game
*gosub ${note}
*label smile
Today is a great day!
*return
*label frown
Today is not a good day.
*return
This doesnāt work, as itās not recognising ${note} as a place to go to. Using (note) or just putting note doesnāt work either. Does anyone have any ideas? The text I want it to write involves a lot of *line_breaks so setting the text as the variable wouldnāt work (at least I donāt think it would).
I didnāt! But I just tried it and it didnāt work
I can get around it using *ifās.
*if note = "frown"
*gosub frown
*if note = "smile"
*gosub smile
However, there are 20 different possibilities for note⦠thatās a lot of (potentially) unnecessary codeā¦