.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
Delay
Old
  (#1)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Delay - 05-06-2010

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 ); 
  
Reply With Quote
Re: Delay
Old
  (#2)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Delay - 05-06-2010

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.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com