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.
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.
- =begin
- #==============================================================================
- # Functions to start and end scenes
- # By gerkrt/gerrtunk
- # Version: 1.1
- # License: MIT, credits
- # Date: 30/09/2011
- # Look here for updates or more scripts:
- # http://usuarios.multimania.es/kisap/english_list.html
- #==============================================================================
- 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.
- Example call script:
- st_scene 7
- Call common event configurated to start scene and active switch 7
- end_scene 7
- Call common event configurated to end scene and desactive switch 7
- -You can use the short alias for each one: s_s and e_s, work equals.
- -Note that the switch id is optional. If no pased don touch nothing.
- end_scene
- =end
- module Wep
- Event_start_scene = 6 # Common event id that start scene
- Event_end_scene = 7 # Common event id that end scene
- end
- class Interpreter
- #--------------------------------------------------------------------------
- # * Start cutscene
- #--------------------------------------------------------------------------
- def st_scene(sw_id=nil)
- $game_switches[sw_id] = true if sw_id != nil
- $game_temp.common_event_id = Wep::Event_start_scene
- # Refresh map
- $game_map.need_refresh = true
- end
- #--------------------------------------------------------------------------
- # * Start cutscene(short alias)
- #--------------------------------------------------------------------------
- def s_s(sw_id=nil)
- st_scene(sw_id)
- end
- #--------------------------------------------------------------------------
- # * End cutscene
- #--------------------------------------------------------------------------
- def end_scene(sw_id=nil)
- $game_switches[sw_id] = false if sw_id != nil
- $game_temp.common_event_id = Wep::Event_end_scene
- # Refresh map
- $game_map.need_refresh = true
- end
- #--------------------------------------------------------------------------
- # * End cutscene(short alias)
- #--------------------------------------------------------------------------
- def e_s(sw_id=nil)
- end_scene(sw_id)
- end
- end
- module Wep
- Scripts_list = [] unless defined? Scripts_list
- Scripts_list.push ('Functions to start and end scenes')
- end
Expand to see the code.