0 votes
asked by (170 points)
I am planning to have a warning system built into my game. Links implying difficult or risky actions will be tagged with the "defiant" class and will shake when clicked. They also have to be clicked multiple times for the story to continue.

How can I set up the shake animation with pure CSS? I tried using keyframes and <<linkreplace>> but the second link replaces the first before the animation is visible.

2 Answers

0 votes
answered by (2.7k points)
edited by

How are you getting the link to shake? I might be able to help. The Sugarcube <<timed>> macro might allow the animation to show. As for how to actually make it shake... I have no idea.

Edit: Install the shaking links add-on mentioned below. Then use this code:

<<linkreplace "Shaking Link">><<shake>>[[Shaking Link]]<</shake>><</linkreplace>>


0 votes
answered by (690 points)
I haven't used it myself, but one of the add-ons listed on the Sugarcube 2 page is a macro to do shaking text. http://www.motoslave.net/sugarcube/2/
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.