Twine Version: 2.6.2
Story Format: Sugarcube
I’m new to Twine and I started a story in Sugarcube format.
I managed to find several things and my story is starting to take shape but I have a big problem…
Regarding this part that I can’t solve, my original code was:
<<button "Go Jogging">> <<AddHour>> /* widget i created who add 1 hour to my time game system */ <set $Player.Jogging +=1> <<script>>state.display(state.active.title, null, "back")<</script>> /* script found on the web. I understand having tested it that it refreshes my page but that's it. I do not understand anything. */ <</button>>
I thought to myself: Why not replace the text with a nice image…
In desperation and having found nothing else approaching what I’m trying to do, I came to this:
My actual “Main passage” content is:
<a data-passage="Jogging"> <img src="ressources/activity/links/jogging.jpg"> </a>
and my “Jogging passage” content is:
<<AddHour>> <set $Player.Jogging +=1> <<goto "Main">>
I think there must be a much more suitable solution and especially without using the goto function.
In addition, this method breaks the thread of the history of history and backtracking is no longer possible.
I’m going to try to make a little RPG so I’ll have a lot of this kind of training type action to do.
I’m just trying to create a button with an image that does 2 or 3 simple actions/operations without leaving my main passage.
The solution may be very simple… Thank you in advance for your answers.
PS: I hope to make myself understood because English is not my native language and I used a translator