Hacked out details from a console log, use it however. (Needs corrections and clarification)
Register an Input event:
registerInputEvent(fxDTSBrick, onActivate, Self fxDTSBrick Player Player Client GameConnection MiniGame MiniGame)
registerInputEvent(CLASS NAME, FUNCTION, MENUNAME CLASS NAME 2 MENUNAME CLASS NAME 2 ...)
CLASS NAME likely has to be fxDTSBrick all the time, then your mod would call fxDTSBrick::FUNCTION.
MENUNAME is something like "Self", "Player" and sets the outputs list as the ones relevant to the CLASS NAME 2. (A class name like Player, GameConnection or MiniGame) Each pair is split by a tab.
e.g.function fxDTSBrick::stuffHappens(%brick)
{
//This is called when Stuff Happens
}
registerInputEvent("fxDTSBrick","stuffHappens","Self fxDTSBrick Player Player Client GameConnection");
... Would let you create an input called stuffHappens, which can then cause events to happen to a Player, Client or Itself. See In an Input function for how to set variables for the targets.
<NAMED BRICK> seems to be automatically added.
In an Input function: (Thanks, TheGeek!)
Set variables for each of the targets, depending on the function, then call processInputEvent.
registerInputEvent("fxDTSBrick", "onToolBreak", "Self fxDTSBrick" TAB
"Player Player" TAB
"Client GameConnection" TAB
"MiniGame MiniGame");
function fxDTSBrick::onToolBreak(%obj, %client)
{
//setup targets
//player = person who destroyed it
$InputTarget_["Self"] = %obj;
$InputTarget_["Player"] = %client.player;
$InputTarget_["Client"] = %client;
if($Server::LAN)
{
$InputTarget_["MiniGame"] = getMiniGameFromObject(%client);
}
else
{
if(getMiniGameFromObject(%obj) == getMiniGameFromObject(%client))
$InputTarget_["MiniGame"] = getMiniGameFromObject(%obj);
else
$InputTarget_["MiniGame"] = 0;
}
//process the event
%obj.processInputEvent("OnToolBreak", %client);
}
Register an Output event:
registerOutputEvent(fxDTSBrick, setColorFX, list None 0 Pearl 1 Chrome 2 Glow 3 Blink 4 Swirl 5 Rainbow 6, 0)
registerOutputEvent(fxDTSBrick, disappear, int -1 300 5)
registerOutputEvent(Player, SetPlayerScale, float 0.2 2 0.1 1)
registerOutputEvent(fxDTSBrick, fakeKillBrick, vector^int 0 300 5)
registerOutputEvent(%class, %name, %parameterList, %appendClient)
registerOutputEvent("CLASS NAME", "FUNCTION", "argumenttype BOUNDS OR SETTINGS argumenttype BOUNDS OR SETTINGS ...", APPENDCLIENT)
CLASS NAME is the same as the CLASS NAME 2's defined in the last function. When you select one of the Targets, all the outputs for objects with the same class name will show.
FUNCTION is the function called.
The arguments start with a lower case type and the bounds/settings for it after. Multiple settings can be given with tabs. If you set this string to "", there are no arguments. I am guessing these are the arguments passed to the function, starting with the object's ID.
If APPENDCLIENT is set, the triggering client will be added to the end of the arguments.
Known types:
int MININUM MAXIMUM DEFAULT (Integer, must be a whole number but can be below zero)
float MINIMUM MAXIMUM STEPSIZE DEFAULT (Floating point number. Displays a slider which snaps to the nearest (stepsize) amount when you drag it and let go.)
list ITEM returnNo. ITEM returnNo. ITEM returnNo. (Returns returnNo. when the item before it is selected?)
bool (Checkbox)
intList NUMBER (List of integers, separated by spaces. The number is the text box length.)
datablock TYPE (Either a datablock type like ProjectileData or ItemData, shows all ones with uiNames, or something like "Vehicle" or "Music" which shows valid music audioProfiles and all rideable vehicles, including player-based ones like Horses)
string CHARACTERS LENGTH (Displays a text box of length LENGTH which can hold up to CHARACTERS letters or numbers)
vector (Displays three boxes which let you input a 3d vector)
paintColor 0 (Displays a selector for a paint colour type. I am not sure what function the 0 has.)
Anyway, do whatever you like with this list, these are my guesses at how to add events and things to the system.
EDIT: Corrections, thanks to TheGeek.
EDIT 2: Corrected argument types float and string and clarified some of the argument types a little more.