Reply to Sequence Changes
If you don't have an account, just leave the password field blank.
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:
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?
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(¤t_sprite, 1); &fake_aviarn = create_sprite(180, 139, 7, 37, 1); sp_seq(&fake_aviarn, 37); sp_nodraw(¤t_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?