Anyways, I'm making an RP of some sorts, and it uses the new Torch Item a good deal. I thought an input event for using the torch on a brick would make for a interesting new experience.
Here's the problem:
I can't script worth stuff.
I know this goes in there somewhere:
function TorchjWeaponImage::onPreFire(%this, %obj, %slot)
{
%obj.playthread(2, armattack);
}
function TorchjWeaponImage::onStopFire(%this, %obj, %slot)
{
%obj.playthread(2, root);
}
function torchProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal, %client)
{
And i'm pretty sure I got the code for the event right too, I just don't know the format or where to insert these codes.
if(%col.getClassName() $= "fxDTSBrick")
{
$InputTarget_["Self"] = %col;
$InputTarget_["Player"] = %obj.client.player;
$InputTarget_["Client"] = %obj.client;
if($Server::LAN)
{
$InputTarget_["MiniGame"] = getMiniGameFromObject(%obj.client);
}
else
{
if(getMiniGameFromObject(%col) == getMiniGameFromObject(%obj.client))
{
$InputTarget_["MiniGame"] = getMiniGameFromObject(%col);
}
else
{
$InputTarget_["MiniGame"] = 0;
}
}
%col.processInputEvent(onTorchHit,%obj.client);
}
}
If anyone can insert this into the Torch script so that it works, please do so.
Thanks, here's the Torch script if you don't already have it.