This script allows you to create events using a “reference event”. The purpose is to allow you to create an event once on a map and re-use it across multiple maps.
This is useful when you have multiple copies of the same event, but you want to avoid having to change each event manually if you decide to change a command or graphic.
For example, suppose you were implementing on-screen enemies where touching an enemy event will begin a battle. If you want to have 20 of these enemies on the map that all do the same thing, rather than copy-pasting one event 20 times, you would first create one enemy event with all of the logic, and then create a second event that will treat the enemy event as the reference event. Then you would copy the second event again and again, so that if you decide to change the enemy event, you don’t have to delete all of the
enemy events and redo the copy paste process.
Script: download here
In the script editor, install this script below Materisls and above Main
To designate a reference event, create a comment on the first page of an event
of the form
<reference event: event_id map_id>
`event_id` is the ID of the reference event `map_id` is the ID of the map of the reference event
If you don’t specify a map ID, it is assumed to be the current map.
When the map is loaded, the event will be replaced by the reference event (except its ID)
i have an issue and if you have the time or are willing to reply and help it will be greatly appreciated! the issue is downloading the JS file and ive had no issues doing this until now this time its only coming up as a text document and not java i know its supposed to be simple by just right clicking and selecting save page as but i cant seem to resolve the issue…thank you for your time
This is an awesome script!
I have been looking at other scripts like this, but a feature I am looking for is missing.
Is it possible to have a separate comment on different pages of the event to change which event is referenced?
I am making a fighting game where the character ID numbers are solidly referenced by other events.
So I need a way to use the same event to represent several characters.
I know i could use switches to activate/deactivate characters but that would require about 300 pages…
Once again, this is an amazing script!
This script works by treating an event as a placeholder. During the game, it will take the appropriate event and replace it with that, meaning the original placeholder is gone.
This means that you can’t really change to a different page of the placeholder, because the placeholder pages are gone.
If we make it so that the placeholder pages are retained by the event, and it will determine which event to copy from, that might work. But I’m not sure how that would be implemented.
I really appreciate the reply.
Thank you for your help 🙂
Script has been updated with a 5x performance improvement on map load times. The note-tag has been changed, however, so that the map ID is an optional value. If the map ID is not specified, it assumes the reference event is on the current map.
Now I don’t have to use so many of my common events.