Monster Event Deletion
Authors: mad.array
Version: 1.0
Type: Snippet
Key Term: Misc Add-on
IntroductionJust a little fix up for a common problem in RMXP. When you erase an event just after a battle, it always appears for a frame before being deleted. WELL NO MORE! With this script you can erase specific events during the battle scene and they will be gone as soon as the battle is over. Please note that you should still set a switch or something else to make sure they don't come back when you re-enter the map though!
Features
- Monsters be-gone!
- People be-gone!
- Any event be-gone!
- Simple Call Script command
ScreenshotsHow do you show an erased event?
ScriptInsert somewhere above Main.
class Game_Temp
attr_accessor :battle_ids
alias init_battle_ids initialize
def initialize
init_battle_ids
@battle_ids = []
end
end
class Scene_Map
alias call_battle_ids call_battle
def call_battle
call_battle_ids
for i in 0...$game_temp.battle_ids.length
$game_map.events[$game_temp.battle_ids[i]].erase
end
$game_temp.battle_ids = []
$game_map.need_refresh = true
end
end
InstructionsTo use, simply set up a Call Script before your battle. Inside the script put:
$game_temp.battle_ids =[1,2,3]
Replacing the 1,2 & 3 with the event ids that need deleting. Again, make sure you still set up another, more permanent, method to make sure the event doesn't reappear.
CompatibilityI don't think there will be any compatability issues. Aliases call_battle from Scene_Map and Initialize from Game_Temp.
Credits and ThanksI did it all by my self. Yaaaaay!
Author's NotesCredit if you so wish, but it's 24 lines of code... several of which are blank. So feel free to just use it. Just don't claim it as your own!