EventScriptUploaded by McTwist
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.
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 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]onActivate->Self->playSound("Beep_Checkout.wav") [x]onActivate->Self->fireRelay # Stop color changing (start with events disabled) [ ]onActivate->Self->playSound("Beep_Denied.wav") end: [ ]onActivate->Self->cancelEvents # Alternate between starting and stopping color changing [x]onActivate->Self->toggleEventEnabled([start:end]) # Change colors [x]onRelay->Self->setColor("0.898039 0.000000 0.000000 1.000000") [x]onRelay->Self->setColor("0.898039 0.898039 0.000000 1.000000") [x]onRelay->Self->setColor("0.000000 0.498039 0.247059 1.000000") [x]onRelay->Self->setColor("0.200000 0.000000 0.800000 1.000000") # Loop color changing onRelay->Self->fireRelay # Stop color changing when brick is blown up onBlownUp->Self->cancelEvents
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.