The Dink Network

Reply to Re: Exact wait();

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 8th 2014, 06:57 PM
wizardg.gif
Paul
Peasant He/Him United States
 
Alright, so your code above could be re-written this way:

void main ( void )
{
  int &hrt = create_sprite(50, 350, 0, 52, 1);
  int &now;
  int &then = sp_attack_wait(&hrt, -1);
beat:
  sp_size(&hrt, 100);

loopa:
  wait(10);
  &now = sp_attack_wait(&hrt, -1);
  &now -= &then;
  if (&now < 2000)
    goto loopa;
  &then += 2000;
  sp_size(&hrt, 140);

loopb:
  wait(10);
  &now = sp_attack_wait(&hrt, -1);
  &now -= &then;
  if (&now < 2000)
    goto loopb;
  &then += 2000;

  goto beat;
}


I did quickly test this, but only to make sure it works at all. I can't promise it's any more accurate, though I think it should be.