0 votes
by (950 points)
Hello again,

you all are always very helpful with us newbies and I want to thank you for it first before asking my next question... :D

Question:

I seek for a way to change the haircolor up on certain events ... like for instance I write a passage where the player dyes their hair and while doing it the hair color from the players haircolor stats suppose to change to the new hair color... I do have an stats passage where all those user inputs the player does before beginning the game, actually has all those stats listed. I suppose I can change it by accessing those somehow from another passage... just I lack the complete idea how so...

Additionally, I like to include a way for the player to save a game, therefore the game should remember the choices the player made in the beginning like what they put in as their choosen name to be etc... I certainly use the <<remember>> macro for that but would that go in the StoryInit or somewhere else?

Thank you a lot ;)

Mr. Peppermint

4 Answers

0 votes
by (950 points)

I tried it with

<<if visitedTags("HairSalon")>><<set $HairColor to "Red">><</if>>

it didn't work but i am sure I made a mistake on how I wrote it... if it is possible like that to begin with...

0 votes
by (144k points)
edited by
edit: disregard this answer.
+1 vote
by (950 points)

Okay, i figured it out somewhat.. This is what helped me a lot with the <<if>>

Lastly, this is what worked for my needs:

<<if visited("HairSalon")>><<set $HairColor to "Red">><</if>>

Eventually, someone else that looks for a solution like that, find it helpful later on ;)

@greyelf: Your sample was for Harlowe, thought I couldn't work with that, but thank you a lot for your help :)

 

by (8.7k points)

Mr Peppermint,

I don't think you don't need to use <<remember>> to save games.  <<remember>> causes the game to remember variables across different games, as described here.

I could see that causing big problems, because new games would remember variables set from the previous games – what a mess!

 
0 votes
by (144k points)

I like to include a way for the player to save a game

SugarCube comes with a "Save" button in the left side-bar, is there a reason the player can't use that option in your game?

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...