Reply to Re: Need help with a duck script
If you don't have an account, just leave the password field blank.
DD95 maybe try to do this.
void main(void)
{
int &duck = create_sprite(250, 150, 3, 21, 1);
sp_speed(&duck, 1);
sp_base_walk(&duck, 20);
sp_script(&duck, "duck");
}
the duck script:
void main(void)
{
int &duckx = sp_x(¤t_sprite, -1);
int &ducky = sp_y(¤t_sprite, -1);
}
void hit(void)
{
sp_speed(¤t_sprite, 5);
move_stop(1, 4, &duckx, 1);
move_stop(1, 6, &duckx, 1);
move_stop(1, 8, &ducky, 1);
move_stop(1, 2, &ducky, 1);
}
void main(void)
{
int &duck = create_sprite(250, 150, 3, 21, 1);
sp_speed(&duck, 1);
sp_base_walk(&duck, 20);
sp_script(&duck, "duck");
}
the duck script:
void main(void)
{
int &duckx = sp_x(¤t_sprite, -1);
int &ducky = sp_y(¤t_sprite, -1);
}
void hit(void)
{
sp_speed(¤t_sprite, 5);
move_stop(1, 4, &duckx, 1);
move_stop(1, 6, &duckx, 1);
move_stop(1, 8, &ducky, 1);
move_stop(1, 2, &ducky, 1);
}