Sure, but you need to make one important modification. It shouldn't hold people in the air, they should just fall down. I'm using -5 as the vertical velocity, and I think that should be sufficient for the drop. If you feel the player needs to drop more quickly, decrease the number, perhaps to -10.
$impededuration = 3 * 1000; //Change "3" to the number of seconds it should last.
$impedecheckfrequency = 1000 / 2; //Change "2" to the number of times per second it should impede throughout the impede duration.
$impedepercentage = 50 / 100; //Change "50" to the percentage of normal speed you want them to be.
function impedeProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal)
{
if(%col.getClassName() $= "Player" && miniGameCanDamage(%obj, %col) && !%col.impeded)
{
%col.impeded = 1;
impedePlayer(%col);
schedule($impededuration,0,"cancelImpede",%col);
}
}
function impedePlayer(%player)
{
if(isObject(%player) && %player.impeded)
{
%velX = getWord(%player.getVelocity(),0) * $impedepercentage;
%velY = getWord(%player.getVelocity(),1) * $impedepercentage;
%velZ = -5;
%player.setVelocity(%velX SPC %velY SPC %velZ);
schedule($impedecheckfrequency,0,"impedePlayer",%player);
}
}
function cancelImpede(%player)
{
if(isObject(%player))
{
%player.impeded = "";
}
}