Functions to start and end scenes

This is a very small script that automatizes the start and end of X type of scenes.
You have a start and end scene that call commons events, and active a optional
switch, that you can use to know if in scene or not.

  1. =begin
  2. #==============================================================================
  3. # Functions to start and end scenes
  4. # By gerkrt/gerrtunk
  5. # Version: 1.1
  6. # License: MIT, credits
  7. # Date: 30/09/2011
  8. # Look here for updates or more scripts:
  9. # http://usuarios.multimania.es/kisap/english_list.html
  10. #==============================================================================
  11.  
  12.  
  13. This is a very small script that automatizes the start and end of X type of scenes.
  14. You have a start and end scene that call commons events, and active a optional
  15. switch, that you can use to know if in scene or not.
  16.  
  17. Example call script:
  18.  
  19. st_scene 7
  20.  
  21. Call common event configurated to start scene and active switch 7
  22.  
  23. end_scene 7
  24.  
  25. Call common event configurated to end scene and desactive switch 7
  26.  
  27. -You can use the short alias for each one: s_s and e_s, work equals.
  28. -Note that the switch id is optional. If no pased don touch nothing.
  29.  
  30. end_scene
  31.  
  32. =end
  33.  
  34. module Wep
  35.   Event_start_scene = 6 # Common event id that start scene
  36.   Event_end_scene = 7 # Common event id that end scene
  37. end
  38.  
  39. class Interpreter
  40.  
  41.   #--------------------------------------------------------------------------
  42.   # * Start cutscene    
  43.   #--------------------------------------------------------------------------
  44.   def st_scene(sw_id=nil)
  45.     $game_switches[sw_id] = true if sw_id != nil
  46.     $game_temp.common_event_id = Wep::Event_start_scene
  47.     # Refresh map
  48.     $game_map.need_refresh = true
  49.   end
  50.  
  51.   #--------------------------------------------------------------------------
  52.   # * Start cutscene(short alias)  
  53.   #--------------------------------------------------------------------------
  54.   def s_s(sw_id=nil)
  55.     st_scene(sw_id)
  56.   end
  57.  
  58.  
  59.   #--------------------------------------------------------------------------
  60.   # * End cutscene    
  61.   #--------------------------------------------------------------------------
  62.   def end_scene(sw_id=nil)
  63.     $game_switches[sw_id] = false if sw_id != nil
  64.     $game_temp.common_event_id = Wep::Event_end_scene
  65.     # Refresh map
  66.     $game_map.need_refresh = true
  67.   end
  68.  
  69.   #--------------------------------------------------------------------------
  70.   # * End cutscene(short alias)  
  71.   #--------------------------------------------------------------------------
  72.   def e_s(sw_id=nil)
  73.     end_scene(sw_id)
  74.   end
  75.  
  76. end
  77.  
  78.  
  79.  
  80. module Wep
  81.   Scripts_list = [] unless defined? Scripts_list
  82.   Scripts_list.push ('Functions to start and end scenes')
  83. end
Expand to see the code.
this looks like could be very usefull, but is there gonna be a demo? cuz i dunno how to use it :D:
The instructions are in the script. Have you readed they? what dont understand?

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=75599