The Dink Network

Reply to Re: Brain 9 creature slots

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:
 
 
January 12th 2011, 04:13 PM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
What about this?
void main(void)
{
     loop:
     if(sp_hitpoints(&current_sprite, -1) < 1)
     {
         itdied();
     }
     //do stuff for movement and seq
     goto loop;
}
void itdied(void)
{
     //play death animation and give exp
     return();
}


EDIT: I don't know if if(sp_hitpoints(&current_sprite, -1) < 1), works. xD
If it doesn't just set a local int to sp_hitpoints and check the variable in the if-statement.