Skip to content

Instantly share code, notes, and snippets.

@Oddmonster
Created February 1, 2014 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oddmonster/8746430 to your computer and use it in GitHub Desktop.
Save Oddmonster/8746430 to your computer and use it in GitHub Desktop.
A tiny Twine snippet that pseudo-randomizes a variable and prints it to the screen along with the appropriate image. A basic dice function featuring dinosaurs..
<<set $dino_type to either (“tyrannosaur”, “brontosaurus”, “diplodocus”, “triceratops”, “stegosaurus”)>>
You are a <<print $dino_type>>!
<<if $dino_type eq “tyrannosaur”>>
[img[tyrannosaur.png]]
<<elseif $dino_type eq “brontosaurus”>>
[img[brontosaurus.jpg]]
<<elseif $dino_type eq “stegosaurus”>>
[img[stegosaurus.jpg]]
<<elseif $dino_type eq “triceratops”>>
[img[triceratops.jpg]]
<<elseif $dino_type eq “diplodocus”>>
[img[diplodocus.jpg]]
<<endif>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment