Event Spawn ver. 1.2
by Haki
Introduction:
This script is used to force a number of events come out of a specific place. Only one event needs to be created and you can use this script to multiply it as many times as you want (okay, that's not true because RMXP has it's limit, but I guess you won't need so many events).
Script:
Please follow the instructions inside the script. If there's anything you don't get please download the demo.
Download:
http://www.megaupload.com/?d=JUCVVQ9B
Other Notes:
If you use this script credit me(Haki). The script hasn't been tested with any other scripts so if you find any compatibility issues post them in this topic or e-mail me at ivica.hakstok@du.t-com.hr
by Haki
Introduction:
This script is used to force a number of events come out of a specific place. Only one event needs to be created and you can use this script to multiply it as many times as you want (okay, that's not true because RMXP has it's limit, but I guess you won't need so many events).
Script:
Please follow the instructions inside the script. If there's anything you don't get please download the demo.
Code:
#==============================================================
# Haki's Event Spawn Script ver. 1.2
#==============================================================
#
# How to use:
# -Create an event which will be your spawn point. First page of the event should be
# the template for events to spawn. When you're done, create an empty page. The
# third page is your spawn point's page. The fourth page should be empty. The first
# line in the third page should look like
# this:
#
# Comment: spawn
#
# -Second line is used for number of events to spawn, and the third one indicates
# the number of frames that need to pass in order for another event to appear. When
#
# So, if you want ten events to appear with twenty frames interval, the event
# would look like this:
#
# Comment: spawn
# Comment: 10
# Comment: 20
#
# Compatibility
# -The script hasn't been tested with any other scripts.
#
# Bug report:
# -If you find any bugs, e-mail me at ivica.hakstok@du.t-com.hr
#
#==============================================================
class Game_Event < Game_Character
attr_accessor :event
attr_accessor :list
attr_accessor :spawn
attr_accessor :maxno
attr_accessor :sp_rate
attr_accessor :real_sp_rate
alias haki_event_update update
def page
return @page
end
def update
if self.spawn == true
if self.sp_rate == 0
if self.maxno > 0
new_ev = self.event.dup
new_ev.id = $game_map.events.size + 1
$game_map.events[$game_map.events.size + 1] = Game_Event.new($game_map.map_id, new_ev)
$game_map.events[$game_map.events.size].event.pages[2] = $game_map.events[$game_map.events.size].event.pages[0]
key = [$game_map.map_id, new_ev.id + 1, new_ev.pages[2].condition.self_switch_ch]
$game_self_switches[key] = true
self.sp_rate = self.real_sp_rate
$scene = Scene_Map.new
self.maxno -=1
end
else
self.sp_rate -=1
end
end
haki_event_update
end
end
class Game_Map
alias haki_map_update update
def update
for ev in 1..$game_map.events.size
if $game_map.events[ev].list != nil
if $game_map.events[ev].list[0].parameters[0].to_s == "spawn"
$game_map.events[ev].spawn = true
$game_map.events[ev].maxno = $game_map.events[ev].list[1].parameters[0].to_i
$game_map.events[ev].sp_rate = $game_map.events[ev].list[2].parameters[0].to_i
$game_map.events[ev].real_sp_rate = $game_map.events[ev].list[2].parameters[0].to_i
$game_map.events[ev].list[0].parameters[0] = ""
end
end
end
haki_map_update
end
end
Download:
http://www.megaupload.com/?d=JUCVVQ9B
Other Notes:
If you use this script credit me(Haki). The script hasn't been tested with any other scripts so if you find any compatibility issues post them in this topic or e-mail me at ivica.hakstok@du.t-com.hr