Advertisement
Guest User

First Example

a guest
May 4th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.41 KB | None | 0 0
  1. function main() {
  2.     clear();
  3.     var myString = "this";
  4.  
  5.     append("Use append(); to add text to the story field. \n\n Add vars to the text like "+myString+".");
  6.     addChoice("Use addChoice(); to add choices.", next);
  7. }
  8.  
  9. function next() {
  10.     clear();
  11.     addChoice("Get a random integer.", function () {
  12.         var myRandomInt = rndInt(0, 21);
  13.         append("\n"+myRandomInt);
  14.     });
  15.     addChoice("Leave.", modExit);
  16. }
  17.  
  18. main();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement