I want to make sort of a crash up derby mod, but I can't get this to work. I kinda winged it, so I need to know what wrong. I get no syntax errors.
package CarCrash
{
function vehicle::oncollision(%vehicle,%obj,%col)
{
if(%vehicle.getvelocity() >= 10)
{
%vehicle.addhealth("-10");
echo("The car crashed!");
parent::oncollision(%vehicle,%obj,%col);
}
}
};
activatePackage(carcrash);