Disable your Ad Blocker! Thanks :)
Chapter 3
by dingsdongs
What's next?
Begin Character Creation
Character Creation Screen
You can see the working example here.
The settings of this chapter:
Conditions:
-
Score Changes:
-
Chapter source code:
Character Creation Screen
You can spend 5 character creation points freely in the attributes Strength, Intelligence and Charisma.
You have {if Character Creation Points = 5}5{elseif Character Creation Points = 4}4{elseif Character Creation Points = 3}3{elseif Character Creation Points = 2}2{elseif Character Creation Points = 1}1{elseif Character Creation Points = 0}0{else}something went wrong{endif} points remaining to spent as you wish.
Your current values are:
Strength: {if Strength = 6}6{elseif Strength = 5}5{elseif Strength = 4}4{elseif Strength = 3}3{elseif Strength = 2}2{elseif Strength = 1}1{else}something went wrong{endif}
Intelligence: {if Intelligence = 6}6{elseif Intelligence = 5}5{elseif Intelligence = 4}4{elseif Intelligence = 3}3{elseif Intelligence = 2}2{elseif Intelligence = 1}1{else}something went wrong{endif}
Charisma: {if Charisma = 6}6{elseif Charisma = 5}5{elseif Charisma = 4}4{elseif Charisma = 3}3{elseif Charisma = 2}2{elseif Charisma = 1}1{else}something went wrong{endif}
{if Character Creation Points = 0}Your character is created and you are ready to start the story!{endif}
Explanation
- Note: I am not setting any variables or conditions in this chapter "Begin Character Creation" itself. All the work is done before or after. This is necessary because you will enter this chapter more than once.
- Note: You can use if-clauses to display some text according to the value of a variable. Sadly you cannot simply display the value itself at this time. A small workaround like seen in the source below is always needed.
- Note: More info on the if clauses, check this guide from gene.sis https://chyoa.com/chapter/Conditional-Branches---If-Statements.256046
Note: If you have any questions regarding this, feel free to ask on the on the forum.
Note: And as always, if you found something helpful, the author won't mind if you hit the like button ;-)