Introduction
Call a common event instead of a gameover on death.
Use this if you want to show a conversation, or do something else, on dying, controlled using a common event. You can use the gameover event command if you want to gameover as usual at the end of it.
Script
Instructions
Paste above main. Change EVENT_ID to the number of the common event you want to use.
Credits
None necessary.
Call a common event instead of a gameover on death.
Use this if you want to show a conversation, or do something else, on dying, controlled using a common event. You can use the gameover event command if you want to gameover as usual at the end of it.
Script
- #===============================================================================
- # Call common event on battle. By Amy @ http://www.hbgames.org
- #===============================================================================
- class Scene_Battle
- # Set this to the common event you wish to call.
- EVENT_ID = 2
- alias :amy_judge :judge
- # Judge, aliased to amy_judge
- def judge
- old_judge = amy_judge
- # If we're in a gameover and not a "can lose" battle
- if $game_temp.gameover and !$game_temp.battle_can_lose
- # Get the common event
- battle_event = $data_common_events[EVENT_ID]
- # Call the interpreter for this event
- $game_system.battle_interpreter.setup(battle_event.list, 0)
- # No longer a game over!
- $game_temp.gameover = false
- return
- end
- # Otherwise, call the former method
- return old_judge
- end
- end
Expand to see the code.
Instructions
Paste above main. Change EVENT_ID to the number of the common event you want to use.
Credits
None necessary.