Reply to Re: Explosions
If you don't have an account, just leave the password field blank.
Yes. It is easy. You just make two variables for x and y coordinates and use sp_x(¤t_sprite,-1) and the same with sp_y to get the coordinates that you can give the new sprite, also using sp_x and sp_y, but on the newly created explosion sprite, or in the create_sprite. I can show you:
void talk()
{
int &man_x = sp_x(¤t_sprite,-1);
int &man_y = sp_y(¤t_sprite,-1);
int &manexplode = create_sprite(&man_x,&man_y,int brain,int sequence,int frame);
// if you use a shadow brain, then the explosion will follow the man's movements if he continues to move. Hehe, imagine the man just sets himself on fire when you talk. You can add more commands under here, for example if you want the man dead or if you want to give the explosion sprite more properties.
}
void talk()
{
int &man_x = sp_x(¤t_sprite,-1);
int &man_y = sp_y(¤t_sprite,-1);
int &manexplode = create_sprite(&man_x,&man_y,int brain,int sequence,int frame);
// if you use a shadow brain, then the explosion will follow the man's movements if he continues to move. Hehe, imagine the man just sets himself on fire when you talk. You can add more commands under here, for example if you want the man dead or if you want to give the explosion sprite more properties.
}






