The Dink Network

Reply to Sequence Changes

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:
 
 
April 8th 2010, 11:44 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
I have a sprite, on a brain 6 (repeat) doing nothing but just that, repeating. I want (randomly) for this sprite to change to another sequence for 1 whole sequence run and then revert to it's old sequence. If that makes sense, here's some code I tried to use:

void main( void )
{
  int &how_long;
  int &myrand;
  int &fake_aviarn;
  
mainloop:
  &how_long = random(5000, 1000);
  &myrand = random(3, 1);
  
  if (&myrand == 1)
  {
    sp_nodraw(&current_sprite, 1);
    &fake_aviarn = create_sprite(180, 139, 7, 37, 1);
    sp_seq(&fake_aviarn, 37);
    sp_nodraw(&current_sprite, 0);
  }
  wait(&how_long);
  goto mainloop;

}


My problem is knowing when to redraw the original sprite, as I can't figure out an exact length of the new sequence, and the wait command is always a little off on different machines.
Suggestions?