Make Eventing Great Again (Update)

Author Topic: Make Eventing Great Again (Update)  (Read 35255 times)



Version 3

Sorry for the image dump, I had a formatted topic prepared and lost it.

New client features:
  • Move event rows up and down
  • Change color of event rows
  • Indent event rows
  • Minimize event rows based on indentation
  • Save events to a file
  • Load event saves in overwrite or append mode
  • Auto-delay tool makes delay heavy eventing easy
  • Select lines to later copy them
  • Insert line mode allows to copy an individual line
  • Support for input event parameters
New server features:
  • Support for keeping event indents and colors when the client is done eventing
  • Input event parameters system
  • Input event parameters for some default input events
Planned features:
  • Drag and drop
  • Extra input parameters
  • Mass select then indent / change color
  • Choose amount of event swatch colors
  • Event things other than bricks???

For hosts
Commands:
  • /toggleeventpackage --- Super admins only. Turns on and off the input parameter functionality. This won't interfere with the ability of the server to store color and indentation data.
  • /megacheck --- Tells you what version of the mod the server has and tells you which players have the mod and what version
Events with input parameters set by this mod:
  • onActivate --- The parameter is the name of the person doing the activating
  • onProjectileHit --- The parameter is the type of projectile

For developers
First and foremost, you can now add input parameters for your events. Here's what the code for an input parameter looks like:
Code: [Select]
function onProjectileHitCheck(%brick,%client,%target,%param,%specialObject)
{
if(strlen(%param) < 1 || %param == -1)
return true;
else
return $InputTarget_["Projectile"].dataBlock.getID() == %param;
}

registerInputParameter("onProjectileHit","datablock\tProjectileData","onProjectileHitCheck");
This makes it so that the onProjectileHit even has a dropdown under it to select a projectile type. If "None" is selected, the field is left blank, or the client in question doesn't have the add-on, then the event will work as normal. If they do set the parameter, then only projectiles of that selected type will trigger the event.
The function "registerInputParameter" takes three arguments. The first is the input event's name. The second is the parameter. Here are the valid types of parameters currently:
  • "string" --- There are no arguments to this field type. It is always the size of the dropdown above it.
  • "list" TAB item id item id item id... --- The first field is always just the parameter type. Here the second field is alternating space-separated item names and item ids for the list.
  • "datablock" TAB type --- The second field is the type of datablock to populate the list with. (e.g. projectileData, playerData, emitterData etc.)

The final argument is the function to use to check the input parameter.

As for the function itself, whether it returns true or false determines if the event continues normally or not. The arguments for the function are:
  • %brick - The brick that has the event
  • %client - The source client
  • %target - The selected target object, this can be any of the $inputTarget_* variables.
  • %param - The chosen value for the parameter
  • %specialObject - This is passed as a new third optional argument to fxDtsBrick::procesInputEvent
  • Note 1: None of these arguments are guaranteed to point to valid objects, do isObject checks on them before handling.
  • Note 2: You can obviously access all the $InputTarget_* variables if need be, the %target just gives you the one the player selected in the targets dropdown.


Also of note is the fact you can package the function addDropDownEventOptions(%button) to add additional options to the events menu drop down. Also you can package doDropDownOption() to handle when that option is selected.


Changelog
  • Version 3.1 --- 20:58 1/1/2018 --- Minor fix added where drop downs in the params section would open if you had listbox search add-on no matter what and possibly even crash your client.
  • Version 3 --- 15:54 28/11/2017 --- Support for loading event gui plus saves added. If you have drop down menus add-on added, each button's submission will trigger the next button's drop down to open automatically.
  • Version 2.9 --- 20:17 26/11/2017 --- Support for Client_EventScripting added, looping sounds that can't be used in events removed from playSound event, console warnings when you don't have the drop down menu add-on removed.
  • Version 2 --- 15:55 25/2/2017 --- Delay box moved under enabled box to save space. Vehicle dropdown boxes work now. Event lists are requested at first spawn so the issues with events taking a while to load or loading twice should be fixed. Server sided package disabled to fix all problems with events not working.
  • Version 1.85 --- 18:38 12/14/2016 --- Events that have no delay no longer use schedules. This should fix the use of the cancelEvents event.
  • Version 1.8 --- 16:03 12/14/2016 --- Fixed bug where people with the client couldn't save. (It was a really silly error on my part)
  • Version 1.74 --- 23:24 12/13/2016 --- /clearallevents now requires admin
  • Version 1.73 --- 14:00 12/13/2016 --- Initial release

Download
Current release mirrors:
« Last Edit: January 01, 2018, 07:59:22 PM by DrenDran »



this addon is mega cool


I think you forgot the admin check on cancel all events.
Why did you package that anyways?

I think you forgot the admin check on cancel all events.
Why did you package that anyways?
Whoops! I fixed that and re-uploaded as verison 1.74.
I packaged it because I wasn't confident I put the event schedules in the correct quota objects.
I have to go now so I'll take a longer look at it in a few hours.
« Last Edit: December 13, 2016, 10:24:49 PM by DrenDran »

Looks amazing. However, one thing is bugging me!!!


You could save a little more space. :))))))

does this conflict with the eventing ui changes made by the old bl essentials mod?


does this conflict with the eventing ui changes made by the old bl essentials mod?
My mod? Yeah, but it sucked and this has everything it had.

oh yeah, i misunderstood and thought this was a serversided mod lol

oh yeah, i misunderstood and thought this was a serversided mod lol
its both, actually

input parameters add more control to events but also require server to have mod enabled

I'm rather happy about this sudden change in events.