Sporkinator

Random Stuff

Dec 21st, 2011
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Create
  2. textList = ds_list_create(); //create a list
  3. buildList(); //build the list
  4. ds_list_shuffle(textList); //shuffle to make it random
  5.  
  6. //Stuff
  7. if (randomTIMER > 29)
  8. {
  9.     showDebugDialog("STEP EVENT! Time! Preparing to take random from list " + string(textList));
  10.     if (ds_list_size(textList) == 0) //if list empty
  11.     {
  12.         showDebugDialog("List Empty");
  13.         buildList(); //rebuild
  14.         ds_list_shuffle(textList); //shuffle for randomness
  15.     }
  16.     showDebugDialog("Getting random text from:" + string(textList));
  17.     randomTEXT = ds_list_find_value(textList, 0); //get the first entry
  18.     ds_list_delete(textList, 0); //remove it
  19.     randomTIMER = 0;
  20. }
  21. else
  22. {
  23.     randomTIMER += 1;
  24. }
  25.  
  26. //SCRIPT: buildList
  27. ds_list_add(textList, "Making Sounds");
  28. ds_list_add(textList, "Creating Sprites");
  29. ds_list_add(textList, "Painting Backgrounds");
  30. ds_list_add(textList, "Loading Levels");
  31. ds_list_add(textList, "Teaching Enemies");
  32. ds_list_add(textList, "Doing Something Important");
  33. ds_list_add(textList, "Re-killing GLaDOS");
  34. ds_list_add(textList, "Whatever he said");
  35. ds_list_add(textList, "Disabling Microsoft Product");
  36. ds_list_add(textList, "Kicking a kitten");
  37. ds_list_add(textList, "Checking Facebook");
  38. ds_list_add(textList, "Oops, forgot something, going back");
  39. ds_list_add(textList, "Banning trolls");
  40. ds_list_add(textList, "Her name is Caroline!");
  41. ds_list_add(textList, "Re-installing operating system...");
  42. ds_list_add(textList, "ERROR: in C Drive. Installing virus...");
  43. ds_list_add(textList, "Achievement Unlocked: Wait... No...");
  44. ds_list_add(textList, "Baking Nyan Cat...");
Advertisement
Add Comment
Please, Sign In to add comment