Raised This Month: $ Target: $400
 0% 

Solved Glitched Audio


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-17-2018 , 08:44   Re: Glitched Audio
Reply With Quote #1

1. Show g_iSounds values.
2. Most likely because you set the entity to think each 0.01 seconds and you are always emitting the sound, without ever letting it play. You need to sync the entity think to the sound duration. For example if sound duration is 1 second then the entity should think each 1.0 seconds to let the sound play.
__________________
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-17-2018 , 08:47   Re: Glitched Audio
Reply With Quote #2

Quote:
Originally Posted by HamletEagle View Post
1. Show g_iSounds values.
2. Most likely because you set the entity to think each 0.01 seconds and you are always emitting the sound, without ever letting it play. You need to sync the entity think to the sound duration. For example if sound duration is 1 second then the entity should think each 1.0 seconds to let the sound play.
1)
PHP Code:
PARACHUTE_DEPLOY_SOUND CS_BattleRoyale_Sounds/Parachute_Deploy.wav
LANDING_SOUND 
CS_BattleRoyale_Sounds/Landing.wav
AIRDROP_APPEAR_SOUND 
CS_BattleRoyale_Sounds/AirDrop_Appear.wav
AIRDROP_LAND_SOUND 
CS_BattleRoyale_Sounds/AirDrop_Landing.wav 
2) Doesn't FL_ONGROUND get called only when entity/player hits the ground? So basically just once? I think it does. My entity doesn't jump around for it to get called more than once.
__________________
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-17-2018 , 09:31   Re: Glitched Audio
Reply With Quote #3

Quote:
Originally Posted by edon1337 View Post
1)
PHP Code:
PARACHUTE_DEPLOY_SOUND CS_BattleRoyale_Sounds/Parachute_Deploy.wav
LANDING_SOUND 
CS_BattleRoyale_Sounds/Landing.wav
AIRDROP_APPEAR_SOUND 
CS_BattleRoyale_Sounds/AirDrop_Appear.wav
AIRDROP_LAND_SOUND 
CS_BattleRoyale_Sounds/AirDrop_Landing.wav 
2) Doesn't FL_ONGROUND get called only when entity/player hits the ground? So basically just once? I think it does. My entity doesn't jump around for it to get called more than once.
1. I have the impression that when using client_cmd and spk you need to use full path(i.e sound/CS_BattleRoyale_Sounds/Parachute_Deploy.wav) and when precaching you need only CS_BattleRoyale_Sounds/Parachute_Deploy.wav.

Try something like:
PHP Code:
client_cmdid"spk sound/%s"g_iSoundsLanding_Sound ] ); 
2.No. Once FL_ONGROUND flag is set then it remains on player flags until they are no longer on ground. Put a message in there, you'll see it keeps being printed.
It doesn't "get called", it's a flag so it is added/removed. Like you would do some_var = 1 and later to clear that value some_var = 0.
__________________

Last edited by HamletEagle; 07-17-2018 at 09:35.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-17-2018 , 10:56   Re: Glitched Audio
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
1. I have the impression that when using client_cmd and spk you need to use full path(i.e sound/CS_BattleRoyale_Sounds/Parachute_Deploy.wav) and when precaching you need only CS_BattleRoyale_Sounds/Parachute_Deploy.wav.

Try something like:
PHP Code:
client_cmdid"spk sound/%s"g_iSoundsLanding_Sound ] ); 
2.No. Once FL_ONGROUND flag is set then it remains on player flags until they are no longer on ground. Put a message in there, you'll see it keeps being printed.
It doesn't "get called", it's a flag so it is added/removed. Like you would do some_var = 1 and later to clear that value some_var = 0.
So what should I use to be able to know player's first landing on ground, if he spawns in the sky?

Basically #1 code was okay, I just was emitting the wrong sound and at the wrong time. Fixed
#2 & #3 the problem is what you told me, I'm using Think and FL_OnGround
#4 works
__________________

Last edited by edon1337; 07-17-2018 at 11:00.
edon1337 is offline
Reply



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


All times are GMT -4. The time now is 12:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode