Hi there,
For some reason I can’t get the following to work. I want the pitstop area to take 1 pt off the damage every second… but it takes it all in one go. I am calling this from inside Update… is this the problem? I can’t see how else I could call it though as I need to check repeatedly if the car is in the pits…
function PitStop()
{
if (g_fSpeed <= 0.1f && iPlayerOneDamage > 0)
{
--iPlayerOneDamage;
yield WaitForSeconds(1.0f);
// Print damage to console
print("Player Damage" + iPlayerOneDamage);
}
}