The Dink Network

Reply to Re: How to...

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:
 
 
October 21st 2010, 03:07 PM
dinkdead.gif
sp_pframe(sprite, frame) will change the frame, so you just need to add a variable that keeps count of how many times you hit it.

//for example
void hit (void)
{
  &counter += 1;
  if (&counter >= 5)
  {
    sp_pframe(&current_sprite, 3);
  }
  if (&counter >= 10)
  {
    sp_pframe(&current_sprite, 7);
  }
  //etc etc etc etc etc
}