Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Random Variable Generator - Harlowe

$
0
0
I have been coding with Harlowe for a while and i really needed a random variable generator so I came up with one. Its a little clunky but it gets the job done. If anyone has anyway to make it better that would be amazing.

Code:

(set: $function1 to '(set: $random_name to (either: "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","y","u","v","w","x","y","z") + (either: "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","y","u","v","w","x","y","z") + (either: "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","y","u","v","w","x","y","z"))')
$function1
(if: $var_name1 is 0)[(set: $var_name1 to '$' + $random_name)]
(set: $random_var to '(set: $' + $random_name + ' to "hello")')

$random_var

$random_name

$var_name1

Viewing all articles
Browse latest Browse all 1844

Trending Articles