- Aug 26, 2016
- 164
- 804
Since you want to display stat changes, which would have changed when clicking something on the previous passage, you could change your stats macro to only calculate the value of the change and push it to an array:
Then in the next passage you can call a macro that will display all the changes and empty the array
All the player stat have been moved to a player object, and all addictions to an addiction object. That way if you were to add more addictions at some point you wouldn't have to rewrite functions that loop over all addiction like this:
Since the addictions total will become stale as soon as any of the addictions change, it's better to assign it as a temporary var and only calculate it when needed. Otherwise it will become stale and, if you forget to recaculate it before using it again, could lead to unexpected outcomes.
If you want to display an image randomly, instead of:
You could use this:
variables().changes.push([stat, value]);
Then in the next passage you can call a macro that will display all the changes and empty the array
You don't have permission to view the spoiler content.
Log in or register now.
All the player stat have been moved to a player object, and all addictions to an addiction object. That way if you were to add more addictions at some point you wouldn't have to rewrite functions that loop over all addiction like this:
You don't have permission to view the spoiler content.
Log in or register now.
If you want to display an image randomly, instead of:
<<randomInt 1>><<if $int eq 0>><img src="img/enemy1/01/tease1.jpg"><</if>><<if $int eq 1>><img src="img/enemy1/01/tease2.jpg"><</if>>
[img[`img/enemy1/01/${either('tease1', 'tease2')}.jpg`]]
Last edited: