Quantcast
Channel: Twine Forum
Viewing all articles
Browse latest Browse all 3830

Gold, Silver, Copper calculation

$
0
0
Hey fellas,

I'm thinking of setting up a traditional gold silver copper system for which each 100 coppers need to turn into 1 silver etc. I wrote this.
<<for $i = 0; $i lt 10; $i++>>
<<if $copper > 100>><<set $copper -= 100>><<set $silver += 1>><<endif>>
<<if $silver > 100>><<set $silver -= 100>><<set $gold += 1>><<endif>>
<<endfor>>

Now I don't want to add the above to every passage where there is gold interaction. Is there a way for me to put it into a separate passage and when there is a gold interaction have the story run through that separate gold recalculation passage and then to the next relevant passage without the user seeing it? Is there another way for the gold to be recalculated automatically?

Thanks

Viewing all articles
Browse latest Browse all 3830

Latest Images

Trending Articles



Latest Images