Well, I think I solved the problem now, I just need to test it. I might as well say it, since not many people view this board anyway.
What I'm trying to make is support for impact damage to players in vehicles. I though at first it'd mean adding a function to every single vehicle script. I was wrong; it looks like the following (untested) should work:
function WheeledVehicleData::onCollision(%this, %player, %client, %obj, %speed)
{
Parent::onCollision(%this, %player, %client, %obj, %speed);
if(%toggled)
{
if(%obj.getDataBlock().playerImpactDamage)
{
if(%speed >= %obj.getDataBlock().slowImpactSpeed && %speed < %obj.getDataBlock().fastImpactSpeed)
{
%player. //Subtract health here.
}
else if(%speed >= %obj.getDatablBlock.fastImpactSpeed)
{
%player. //Subtract health here.
}
}
}
}
This isn't the whole code by the way, I have some more for toggling it on and off.