.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   Delay (http://forums.bots-united.com/showthread.php?t=7623)

Bend3R 05-06-2010 14:19

Delay
 
Have not use delay before, but now I'm in need of it.
This one compiles fine, but it do not work. It just play "clipin.wav" sound.
clipin.wav is supposed to be the second one with 1 sec delay after the first one (clipout.wav).

PHP Code:

case RELOAD:
EMIT_SOUNDENT(pev), CHAN_WEAPON"weapons/clipout.wav"1ATTN_NORM );

if (
m_flDelay == 1)
{
   
EMIT_SOUNDENT(pev), CHAN_WEAPON"weapons/clipin.wav"1ATTN_NORM );
}
break; 

Also, I would like this one to play 5 times with 1 sec after each playtime:
PHP Code:

EMIT_SOUND(ENT(pev), CHAN_WEAPON"weapons/1.wav"1ATTN_NORM ); 


The Storm 05-06-2010 17:01

Re: Delay
 
Use the gpGlobals->time variable(if I remeber correct) the get correct timing between the frames, also for the first case try to change the "if (m_flDelay == 1)", to "if (m_flDelay >= 1)". Sinse this seems to be float variable the chance to be 1.00001 or something like that is big. :)


All times are GMT +2. The time now is 03:03.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.