Add-Ons >> Boards >> Support Mods >> EventScript


Uploaded by McTwist
Support Mods
Aug 19th 2018, 12:00 PM


For years people have used Duplicator or manual copying to transfer events from bricks and builds to other bricks and builds. Sharing events to others is also a hassle. Handling a huge amount of events have always become tedious and problematic. However, there is a solution for this.

This mod introduces the ability to script your events, through the new scripting language EventScript. It removes the hurdle of sharing. It reduces the problem with huge amounts of events. It completely obliterates copying issues.

Download. Install. Set your shortcuts of copy/paste/editor. Start scripting.

Copies the left code into the event system and then copies the event system into readable script.


After installing the add-on, go to Options to set the shortcuts for copying and pasting events. Keep in mind that anything that relates to ctrl+c, alt+c, ctrl+v and alt+v will not work as expected. When this is done, one could easily just join a server and go into eventing mode. While there, just copy the events with previously mentioned shortcut. This will place the script in the clipboard, ready to be pasted in any text editor of choice. If a script already is within the clipboard, it can be pasted in the same manner with the other shortcut.

Any errors will halt the script and let the user know, giving brief explanation of why it could not parse the script. Keep in mind that pasting will always overwrite your current events, unless an error occurs.

There also exists an in-game editor, for quicker access and easier eventing.

It is also possible to paste the script on the server, if the add-on is enabled.

$script = EventScriptServer_save(_myBrick);
EventScriptServer_load(_myBrick, $script)

First function saves the events to a string.
Second function loads the string onto the brick.

Key bindings

When no binding is set, these are the default:

ctrl+shift+c  Copy
ctrl+shift+v  Paste
ctrl+shift+e  Editor
cmd+shift+c   Copy
cmd+shift+v   Paste
cmd+shift+e   Editor

Script Example

Script provided by Platypi.

# Author: Platypi / SadBlobfish
# Makes a brick change colors on a loop when toggled

# Start color changing (start with events enabled)
start: [x][0]onActivate->Self->playSound("Beep_Checkout.wav")

# Stop color changing (start with events disabled)
[ ][0]onActivate->Self->playSound("Beep_Denied.wav")
end: [ ][0]onActivate->Self->cancelEvents

# Alternate between starting and stopping color changing

# Change colors
[x][0]onRelay->Self->setColor("0.898039 0.000000 0.000000 1.000000")
[x][500]onRelay->Self->setColor("0.898039 0.898039 0.000000 1.000000")
[x][1000]onRelay->Self->setColor("0.000000 0.498039 0.247059 1.000000")
[x][1500]onRelay->Self->setColor("0.200000 0.000000 0.800000 1.000000")

# Loop color changing

# Stop color changing when brick is blown up

Known issues

An unknown amount of Add-Ons wont work correctly with this mod as they are modifying the Event window in an evil manner.
It is known that people have their own suggestion for design, but surely this standard is already set and cannot be altered.


Version 1.11.0

December 13, 2018

Version 1.10.0

October 26, 2018


No bugs reported.
Dec 20th 2018, 10:54 AM
@Mango 2 True, but it doesn't have /ShareEvents or /UploadToForum.
Mango 2
Dec 19th 2018, 7:04 AM
Dosent The Duplicator Have The Command /FillEvents
Dec 13th 2018, 8:34 AM
@LmaoRomanFox2Wtf I have tried to on my server several times, but am unable to recreate the bug. I even tried to use the not recommended Ctrl+C and Ctrl+V, and it still worked like it was nothing. However, if I opened the options window while inside the events window, it broke the keybinds somehow. I'm looking into that as I'm writing this.
Either you are using a Mac, which is having issues with keys anyway, or you did something that I have no control over.
Keep in mind, that even with the shortcuts not working, there is three buttons on the top right of the event window that I left there as a last way out if the shortcuts didn't work. So you can still use the mod normally without the shortcuts.
[ FocalFlare ]
Dec 8th 2018, 11:39 PM
Apparently there's a bug that I found with this add-on. First of all, this add-on works fine (just wondering what the language of the scripts these events are copied and pasted in). No clickbait shit. 10/10. But I digress. Now the bug is this: Whenever you bind a key to copy, paste, or open the editor of the events, you already "activated a ticking time bomb right off the bat." I said this because you'll happen to not realize until you start or join a server. The next time you start/join a server, it's already over with, because by the time you are in it, randomly out of complete nowhere, your three keys that you've binded to copy, paste, and open the editor will lose function, meaning they will not work temporarily. On the client's side, this will only go away until you restart the game. However, I decided to REMOVE THE KEYBINDS of those three actions. But in order for me to use this again, this bug needs to be fixed. Once again, as stated before, this is a great add-on, but needs some bug-fixing. - Ya boi RomanFox2