[baeSuite] » baeTriggers | In-game scripting

Script [baeSuite] » baeTriggers | In-game scripting 1.0-BETA

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Wheezy/Josh (loading/unloading files), Snow-Pyon (dynamic functions)

In-game scripting interactions
About baeTriggers

Designed for when I was playing the skUnity Minecraft Server (play.skunity.com btw), and wanted to make an animated door, baeTriggers allows you to easily create interactions in-game. It's somewhat of a scripting language. Inspired by VariableTriggers, baeTriggers allows you to create 'animations' and interactions in-game. It's somewhat of a scripting language which utilises Skript.

As I began to create baeTriggers, I have tried out different concepts in Skript. Currently, baeTriggers utilises dynamic function calling, loading/unloading scripts as dependencies and ZIP file creation. The point of baeTriggers is to create something useful while also using different concepts in Skript.

How to use baeTriggers

  1. Use the download button above. You'll be given baeTriggers.zip.
  2. Open the ZIP up and drag the /plugins/ folder from the ZIP into the root of your folder.
  3. Restart your server or perform the command /sk reload baeTriggers
  4. baeTriggers will boot up and load required dependencies.
  5. Run the command /baetriggers setup <name of trigger>
  6. You'll be instructed to use a stick and say what you'd like to do. You can find default syntax below
  7. Once done, finish the setup by doing /baetriggers setup end
  8. You can read more about executing triggers below
Executing a trigger

As of 1.0-BETA, you can execute a trigger by:

/baetriggers execute <name of trigger>
Pressure plate
Look at a pressure plate and perform the command /baetriggers pressureplate <name of trigger>
Exporting a trigger

Packaged with 1.0-BETA is a Skript exporter. You can do /baetriggers export skript to start the export process. You'll be asked to send in chat which trigger you'd like to export. The exporter will then export the trigger and inform you of what to do next.

You can export the whole of baeTriggers or select parts by doing /baetriggers export zip and then any of:

Exports everything baeTriggers has, including the main baeTriggers.sk
Only export the extensions used by baeTriggers
Export the contents of the /baeSuite/baeTriggers/Triggers folder. There is no other save format for triggers than directly in baeTriggers or exporting to Skript.
Modes are what powers baeTriggers scripting. You can export just them.
btr or script
Export just the baeTriggers.sk file into a ZIP
What are Modes and what's .btr?

Modes are located in /baeSuite/baeTriggers/modes/ and saved using .btr. There is no specific reason for the file format, it was just to see how Skript interacts with files that aren't .sk. Modes are what baeTriggers loads into itself to then be able to perform the setup. A good example is set_block.btr mode which is well commented with a lot of information.

[Important] Interaction with chat scripts

baeTriggers uses chat to get more information to keep the main command short. If you're using a chat script, it may cause conflicts with baeTriggers which will cancel the event. If your chat script is cancelling it first and then sending the message, then people setting up a trigger will have their message sent. You add the following code to your chat script:

on chat:
    if {btr::temp::player::%uuid of player%::trigger} is set:

[Important] Interaction with script management scripts

baeTriggers will stop itself from being reloaded or stop the /skript reload all command due to the way script dependencies are loaded. As such, you may have negative interactions between baeTriggers and scripts that try and manage other scripts. baeTriggers will try and stop reloads, but then gets the player to continue the command after it's shutdown. In later versions, more controls will be put in place.

Core syntax

The core syntax are the modes that come with baeTriggers. This includes:

set block [to] %block%
set block to stone
set block air​
wait %timespan%
wait 1 second
wait 10 minutes
wait 1 hour
More modes will be added as development continues. You can read set_block.btr in /baeSuite/baeTriggers/modes/ for more information on creating modes. It's advised to use the extensions folder for any mode you create as to prevent loss of data in the event an update contains the same file. You're unable to use any delays due to the nature of functions in Skript and how the baeTriggers parser works. The only delay is the wait mode which is somewhat hardcoded in.

Future development

I'm planning on adding this to GitHub and having a continued development effort. The idea behind baeTriggers is quite strong the core parts do exist. It's now to flesh it out and make it more usable.

Planned features:
  • Triggers
    • View active, suspended and running triggers
    • Control, delete, suspend and manage triggers
    • Add a way to create a trigger outside of baeTriggers
  • Execution
    • Create an execution registry to make it easier to support different trigger points instead of just pressure plates
  • Modes
    • Create more modes and flesh baeTriggers out
  • Extension API
    • Create a way for extensions to take a lot of control over baeTriggers and provide additional functionality to baeTriggers

Thanks for reading! baeTriggers is an upcoming script within the baeSuite family. I haven't released a baeSuite script in a while, but am looking at getting back into creating scripts as I've enjoyed creating baeTriggers.

If you have any suggestions, feedback or want to help contribute, then please just reply to the Discussion.

Many thanks,
First release
Last update
0.00 star(s) 0 ratings

More resources from BaeFell