The Dink Network

Reply to Re: Explosions

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 24th 2006, 06:21 AM
peasantmg.gif
ehasl
Peasant He/Him
 
Yes. It is easy. You just make two variables for x and y coordinates and use sp_x(&current_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(&current_sprite,-1);
int &man_y = sp_y(&current_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.
}