No matter what I do with this function it cannot properly work at all. It literally doesn't do what I tell it to do.
float Time = (1.05f - GetTimerTimeLeft("ImpactTime")); // Get's the time taken to impact
float Speed = (Distance / Time); // Gets the speed
if(Speed >= 0.25f && GetPropIsInteractedWith(asParent)) // Minimum necessary speed (don't want this to happen if the rock is hold)
{
PlayMusic("17_paper_herbert01.ogg", false, 0.7f, 0, 10, false);
CompleteQuest("MainVaultDoorsClosed", "MainVaultDoorsClosed");
SetEntityActive("shovel_joint_1", false); //Prepare new shovel
SetEntityActive("shovel_joint_2", true);
ShovelImpulse();
SetMoveObjectStateExt("slide_doo_thick_1", -0.5f, 1.0f, 1.0f, 0.0f, true);
SetMoveObjectStateExt("slide_doo_thick_2", 0.5f, 1.0f, 1.0f, 0.0f, true);
SetEntityActive("AreaRockOnShovel", false);
SetEntityActive("AreaRockOnShovel_1", false);
SetEntityActive("AreaRockTooFarIn", false);
SetEntityActive("AreaLeftSide", false);
SetEntityActive("AreaRightSide", false);
SetEntityActive("AreaInteractDoors", false);
}
else
{
SetMessage("Ch04Level21", "ThrownHarder", 0);
}
Is this a bug or am I just not using it correctly?
Derp.