Guest User

Untitled

a guest
Nov 13th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.17 KB | None | 0 0
  1. define e = Character('Eileen', color="#c8ffc8")
  2.  
  3. init python:
  4.     def dynamicMenuManager(origin, target):
  5.         global menuLimit
  6.         menuLimit -= 1
  7.         if menuLimit == 0:
  8.             menuLimit = None
  9.             renpy.jump(target)
  10.         renpy.jump(origin)
  11.  
  12. # The game starts here.
  13. label start:
  14.  
  15.     $ menuLimit = 0
  16.    
  17.     e "You've created a new Ren'Py game."
  18.    
  19.     $ menuLimit = 4 # Change the value to the number of choices you will have; it needs to be changed before every Dynamic Menu
  20.  
  21.     $ menuManager = renpy.curry(dynamicMenuManager)
  22.  
  23. label dynamicMenu1: # You need to create a new label for every dynamic menu you have; not efficient but it gets the job done
  24.    
  25.     $ ui.timer(2.0, menuManager("dynamicMenu1", "tooSlow"))
  26.    
  27.     menu:
  28.         "Option 1" if menuLimit >= 1:
  29.                 $ renpy.quit()
  30.         "Option 2" if menuLimit >= 2:
  31.                 $ renpy.quit()
  32.         "Option 3" if menuLimit >= 3:
  33.                 $ renpy.quit()
  34.         "Option 4" if menuLimit >= 4:
  35.                 $ renpy.quit()
  36.  
  37. label tooSlow:
  38.  
  39.     e "Once you add a story, pictures, and music, you can release it to the world!"
  40.  
  41.     return
Advertisement
Add Comment
Please, Sign In to add comment