AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sound start/end time (https://forums.alliedmods.net/showthread.php?t=307499)

Vieni 05-12-2018 17:21

Sound start/end time
 
Hi!
I'm wondering, is it possible to start sound at a given time?
For example, start at 0:04 and then stop it at 0:08? :D

Natsheh 05-12-2018 18:19

Re: Sound start/end time
 
It depends on gametime or roundtime or real time?

Vieni 05-12-2018 18:46

Re: Sound start/end time
 
On the sound's time. So the sound would start at the 4.sec of that.
For example you have a sound to play which contains "Hello, i'm your chicken for today".
It would say the "your chicken" in 0:02 - 0:03 and just that would be played :D

fysiks 05-12-2018 20:42

Re: Sound start/end time
 
This is the guide that I've been using recently to play sounds partially. Though, I've never tried to play a subset that isn't ether at the beginning or the end (can't remember if you can combine the S and E functionality with a single sound).

You might just need to create a new sound file with just the part that you want then you can simply play the whole sound.

Vieni 05-13-2018 04:41

Re: Sound start/end time
 
Quote:

Originally Posted by fysiks (Post 2591943)
This is the guide that I've been using recently to play sounds partially. Though, I've never tried to play a subset that isn't ether at the beginning or the end (can't remember if you can combine the S and E functionality with a single sound).

You might just need to create a new sound file with just the part that you want then you can simply play the whole sound.

Thank you very much, you helped a lot!
And i have one more question. Is it possible to use it in emit_sound? If not, could one of you make a code, which gets the player ids in the targeted player's x metered area?
With this we could make the 512 limit more "bigger" 'cause of the extra weapons' sounds :)

HamletEagle 05-13-2018 05:32

Re: Sound start/end time
 
Quote:

Originally Posted by Vieni (Post 2591961)
Thank you very much, you helped a lot!
And i have one more question. Is it possible to use it in emit_sound? If not, could one of you make a code, which gets the player ids in the targeted player's x metered area?
With this we could make the 512 limit more "bigger" 'cause of the extra weapons' sounds :)

Loonk for find_sphere_class.

Vieni 05-13-2018 06:19

Re: Sound start/end time
 
Thank both of you! You saved me from a lot of suffering! :wink:

Edit:

The start/end works fine just under 16000Hz.. So i think i won't use it :/


All times are GMT -4. The time now is 04:41.

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