Reply to Prob creating sprite
If you don't have an account, just leave the password field blank.
Okay then,
I am updating my Dmod Helpin' the Ol' duck Farmer, amd I managed to get the giant pillbug in the end spawn smaller pillbugs when hit. There is however one problem. I'll post the hit() void here:
void hit( void )
{
sp_target(¤t_sprite, &enemy_sprite);
playsound(30, 12000, 4000, ¤t_sprite, 0);
//lock on to the guy who just hit us
//playsound
//Spawn small "level 2" pillbugs! v1.1 addition.
if (random(3,1) == 1)
{
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &newpill = create_sprite(&save_x, &save_y, 9, 131, 1);
sp_speed(&newpill, 2);
sp_script(&newpill, "pill2");
}
}
No matter how fast I set sp_speed(), the newly created pillbugs always move VERY fast, almost as fast as Dink himself. Why does this happen and how can I solve it?
PS: "pill2" is a new .c script I created which contains data for a harder pillbug.
I am updating my Dmod Helpin' the Ol' duck Farmer, amd I managed to get the giant pillbug in the end spawn smaller pillbugs when hit. There is however one problem. I'll post the hit() void here:
void hit( void )
{
sp_target(¤t_sprite, &enemy_sprite);
playsound(30, 12000, 4000, ¤t_sprite, 0);
//lock on to the guy who just hit us
//playsound
//Spawn small "level 2" pillbugs! v1.1 addition.
if (random(3,1) == 1)
{
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &newpill = create_sprite(&save_x, &save_y, 9, 131, 1);
sp_speed(&newpill, 2);
sp_script(&newpill, "pill2");
}
}
No matter how fast I set sp_speed(), the newly created pillbugs always move VERY fast, almost as fast as Dink himself. Why does this happen and how can I solve it?
PS: "pill2" is a new .c script I created which contains data for a harder pillbug.