指定されたスポーンマップから目的の場所へのスポーンイベント – GALV_EventSpawner.js

タイトル
Spawn events from a specified spawn map to a desired location.
作者名
ヘルプ
Galv's Event Spawner
----------------------------------------------------------------------------
This plugin allows you to copy events from a specified 'spawn' map and
duplicate them onto the current map. This spawn map is designated with the
"Spawn Map Id" plugin setting.
You can spawn to an x,y location or a random region ID.

When spawning an event, it's important to know that if the location is
blocked by impassible terrain, the player or any other event - it will not
spawn unless you have previously changed Galv.SPAWN.overlap script call to
one of the settings that allows it to overlap things.

If you set the s variable to true in the script calls (below), that event
will be 'saved' and exist until it is cleared. The event is saved where it
is spawned and will not save it's x,y position if it moves and the player
leaves the map (like normal events).

Self switches work for all spawned events while they exist.

----------------------------------------------------------------------------
SCRIPT commands
----------------------------------------------------------------------------

Galv.SPAWN.event(id,x,y,s); Spawn event to x,y coords
s = true to save event
leave s out completely to not save

Galv.SPAWN.event(id,r,s); Spawn event to random region tile
s = true to save event
leave s out completely to not save

Galv.SPAWN.event(id,[r,r,r],s); Spawn event to a random region tile
from the array list.
s = true to save event
leave s out completely to not save

Galv.SPAWN.overlap = type; can be one of the following:
'all' spawns over characters/terrain
'terrain' any terrain, no characters
'chars' any characters, no terrain
'none' spawns on empty tiles only
events spawned after changing this
will use the new overlap type


Galv.SPAWN.clear(mapId); Remove normal spawned events from map
Galv.SPAWN.clear(mapId,true); Remove ALL spawned events inc. saved
Make MapID = 0 to clear current map

Galv.SPAWN.unspawn(this); Unspawns event code is executed in.

----------------------------------------------------------------------------
EXAMPLES
Galv.SPAWN.event(4,6,6); spawn event 4 at x6, y6, not saved
Galv.SPAWN.event(1,12,true); spawn event 1 on random region 12, saved
Galv.SPAWN.event(7,[2,3]); spawn event 7 on region 2 or 3, not saved
Galv.SPAWN.overlap = 'chars'; all events will spawn on top of other
characters from now on.
----------------------------------------------------------------------------
SCRIPT for CONTROL VARIABLES
----------------------------------------------------------------------------
As soon as you spawn an event, you can use the following script inside a
Control Variables event command to store the event ID of the last spawned
event.

$gameMap._lastSpawnEventId

----------------------------------------------------------------------------
パラメータ
param Spawn Map Id
desc The map ID of the map you are using to store spawnable events
default 0

ライセンス表記

紹介ページ https://galvs-scripts.com/category/rmmv-plugins/mv-event-utility/#post-1632