The Dink Network

Reply to Re: Walking sound effect

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:
 
 
August 21st 2014, 12:42 PM
spike.gif
Sure, you can. You could create a loop that checks Dink's X and Y and plays the sound when it changes, for example, or checks if Dink is going through one of his walking sequences. That would be quite a cool feature for a horror dmod, actually.

Crude example:
loop:
int &crap = sp_pseq(1,-1)
//^ not sure whether you should check sp_seq, or sp_pseq. Both probably work.
&crap / 10
&crap * 10
//^ should remove the last digit, so that instead of 72 or something, the result we get will be 70
if (&crap == 70)
&dinkysoundglobal = playsound(3,22050,0,1,0)

if (&crap != 70)
{
//if the sound is currently playing, let's kill it abruptly
if (&dinkysoundglobal != 0)
{
sp_active(&dinkysoundglobal,0)
&dinkysoundglobal = 0
}
}

wait(100)
goto loop