Hello Twine Community,
I'm working on a game where players earn experience. When they earn experience, I would like $player.experience to execute the @@.shudder format for a second, and then stop.
I've read some other threads, and I can see how to apply the custom style to specific text in a passage. Ideally, I'd like to add code to the widget macro, so that each time the experience value changes, the text shudders briefly so the player notices it, then stops. The macro I'm using is:
Is it possible to add an <<if>> clause such that when an experience value changes, a custom effect is applied to $player.experience?
Thank you!
I'm working on a game where players earn experience. When they earn experience, I would like $player.experience to execute the @@.shudder format for a second, and then stop.
I've read some other threads, and I can see how to apply the custom style to specific text in a passage. Ideally, I'd like to add code to the widget macro, so that each time the experience value changes, the text shudders briefly so the player notices it, then stops. The macro I'm using is:
<<widget "stats">>\ <<if $checkloginteacher is true>><<set $player.experience to $player.experience + 5>><</if>>\ <<if $checkopenteams is true>><<set $player.experience to $player.experience + 5>><</if>>\ <b>Experience: <<=$player.experience>> Rank:<<if $player.experience lt 20>> What is TEAMS? <<elseif $player.experience lt 40>> Novice <<elseif $player.experience lt 60>> I'm starting to get it <<elseif $player.experience lt 80>> Almost there <<elseif $player.experience lt 100>> Master TEAMS Player </b><</if>>\ <</widget>>
Is it possible to add an <<if>> clause such that when an experience value changes, a custom effect is applied to $player.experience?
Thank you!