Blockland Forums > Modification Help
Using FxDTSBrick::onactivate?
tyler0:
Ok so i wanna learn how this thing works. I'm guessing it can works like the event "onActivate". I want to get the datablock of the obj the client clicks so that i can send a message to the client saying what id the datablock is. Here is a script i found/made:
--- Code: ---package onActivate
{
function FxDTSBrick::onactivate(%brick,%client,%loc,%rot)
{
connectToClient(%client, 'centerPrint', %brick @ %client @ %loc @ %rot,3);
Parent::onactivate(%brick,%client,%loc,%rot);
}
};
activatepackage(onActivate);
--- End code ---
Also what does %loc and %rot mean?
lordician:
From what i can see from the name it would mean location and rotation.
(loc = location, rot is rotation)
tyler0:
--- Quote from: lordician on June 06, 2011, 05:34:39 PM ---From what i can see from the name it would mean location and rotation.
(loc = location, rot is rotation)
--- End quote ---
Ok thanks. For some reason this script isn't working :(
--- Code: ---package onActivate
{
function FxDTSBrick::onactivate(%brick,%client,%loc,%rot)
{
centerPrint("Brick: " @ %brick @ ". Client: " @ %client @ ". Location: " @ %loc @ ". Rotation: " @ %rot,3);
Parent::onactivate(%brick,%client,%loc,%rot);
}
};
activatepackage(onActivate);
--- End code ---
otto-san:
you're trying to centerprint nothing
what
lordician:
When you want to know something better use "echo("Puttexthere");"
It displays the to be displayed text in the console! :D