Reply to Re: Need help with a duck script
If you don't have an account, just leave the password field blank.
Well, I think the easiest way to do it is this:
Duck script:
void main(void)
{
int &speed = 1;
sp_speed(¤t_sprite,&speed);
}
void hit(void)
{
&speed += 1;
if (&speed <= 5)
{
sp_speed(¤t_sprite,&speed);
}
if (&speed >= 6)
{
freeze(1);
set_smooth_follow(1);
//set_smooth_follow isn't neccessary,
//but it might make it look more pretty.
sp_follow(1,¤t_sprite);
//Move around the duck as much as you want here
unfreeze(1);
}
}
Duck script:
void main(void)
{
int &speed = 1;
sp_speed(¤t_sprite,&speed);
}
void hit(void)
{
&speed += 1;
if (&speed <= 5)
{
sp_speed(¤t_sprite,&speed);
}
if (&speed >= 6)
{
freeze(1);
set_smooth_follow(1);
//set_smooth_follow isn't neccessary,
//but it might make it look more pretty.
sp_follow(1,¤t_sprite);
//Move around the duck as much as you want here
unfreeze(1);
}
}