I doubt that works with projectiles, if it does, then the coding must be different...
...Hmm, i think it is possible, but how much health does the minifig have, 100 like usual or 50, or 200? Or more?
Does this look like it'd work
function shieldProjectile::onEnter(%this,%obj,%col)
{
// Apply health to colliding object if it needs it.
// Works for all shapebase objects.
if (%col.getDamageLevel() != 0 && %col.getState() !$= "Dead" ) {
%col.applyRepair(%this.repairAmount);
%obj.respawn();
if (%col.client)
messageClient(%col.client, 'MsgHealthPatchUsed', '\c2Health regaining...');
}
}
I put the repair thing into the projectile scripts
//projectile
datablock ProjectileData(shieldProjectile)
{
projectileShapeName = "./shapes/shield.dts";
repairAmount = 400;
muzzleVelocity = 50;
velInheritFactor = 0;
armingDelay = 9999;
lifetime = 20000;
fadeDelay = 19500;
bounceElasticity = 0.1;
bounceFriction = 900;
isBallistic = true;
gravityMod = 200.0;
hasLight = true;
lightRadius = 6.0;
lightColor = "0 0 0.5";
};