Edit: I'm dumber than I thought, outputs need a client value to work.
I could solve this by passing a random client, or the host, or get the client from the brick's brickgroup - but then if I do it that way, onPlant events are only really called on bricks of people who are in the game when it's loaded. Hm. But that way is probably the best idea.
So, as it stands now:
package PlantEvent
{
function fxDTSBrick::onPlant(%brick)
{
Parent::onPlant(%brick);
%brick.schedule(33,"processInputEvent","onPlant",0);
}
function fxDTSBrick::processInputEvent(%brick,%event,%client)
{
if(%event $= "onPlant")
{
$inputTarget_Self = %brick;
%client = getBrickGroupFromObject(%brick).client;
}
Parent::processInputEvent(%brick,%event,%client);
}
};
ActivatePackage(PlantEvent);
registerInputEvent(fxDTSBrick,"onPlant","Self fxDTSBrick");
And while we're here, see if anyone can figure out HOW this is useful. I know how it is; can anyone else follow my somewhat deranged train of thought?
Also, in my mind:
33ms delay is to let the brick initiate it's events.
Defining $inputTarget_Self in the parented ::processInputEvent is so that it's calling the right brick.
Defining the client then is also to ensure that it's got the right values.