I wanted to make it more reallistic by making the boat bounce on the waves when moving with high speed, but there is a bug:
http://www.mediafire.com/?nmlgtwymvmy The boat some sort of shakes and twitches when doing that.
I'm using the ForceUp command to make the boat bounce and this is the part of the script, which does all this:
Code: Select all
Wave[ ()
{
if ((SPEED >= 50) and (SPEED <= 100))
{
AMOUNTMIN = 5;
AMOUNTMAX = 10;
}
if ((SPEED >= 100) and (SPEED <= 150))
{
AMOUNTMIN = 15;
AMOUNTMAX = 35;
}
if ((SPEED >= 150) and (SPEED <= 200))
{
AMOUNTMIN = 25;
AMOUNTMAX = 45;
}
if (SPEED < 50)
{
AMOUNTMIN = 0;
AMOUNTMAX = 0;
}
TIMEAMOUNT = random(0.2, 0.8);
if(self.IsFalling and (FORCETIMER <= self.time))
{
FORCETIMER = self.time + TIMEAMOUNT;
}
if (FORCETIMER < self.time)
{
FORCEAMOUNT = random(AMOUNTMIN, AMOUNTMAX);
ForceUp(FORCEAMOUNT);
JUSTLANDED = true;
}
} ]