package radZone
{
function createRadZone(%brick, %owner)
{
if(!isobject(%brick)) return;
%position = %brick.getboxcenter();
%trigger = new trigger()
{
datablock = brickFalloutRadArea;
owner = %owner;
};
%trigger.settransform(%position);
%trigger.setscale(30);
}
function fxDtsBrick::onPlant(%brick)
{
echo("Radzone brick planted!");
echo(%brick @ "Was planted!");
createRadZone(%brick, %owner);
}
function brickFalloutRadArea::OnEnterTrigger(%this, %trigger, %obj)
{
echo("HOLY stuff YOUR IN A RAD ZONEEEEEEEEEEEEEEEEEEEEEEEEEEE");
echo( %client.Name @ " is in deep stuff.");
}
};
activatePackage(radZone);
Well, this is mostly just a random stab at having a placed brick spawn a trigger around it. It didn't work because half of this made up.
If you have any obvious errors/comments to make on it, please feel free to do so. I'll continue doing this in the morning, since right now I just don't have the mind for this. Good night.