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:
 
 
September 25th 2014, 01:12 PM
spike.gif
If it's such simple tiks and toks (and not actual musical music), can't you just use playsound? I mean creating a tik.wav and a tok.wav, and something like this:

void main ( void )
{
int &hrt = create_sprite(50, 350, 0, 52, 1);
int &tiktok
beat:
wait(250);
// ^ tempo, however long it should take between each beat
&tiktok+=1
if (&tiktok < 4)
playsound(tik)
if (&tiktok >= 4)
{
playsound(TOK)
&tiktok=0
if (sp_size(&hrt,-1) == 100)
sp_size(&hrt, 140);
else
sp_size(&hrt, 100);
}
goto beat;
}