Raised This Month: $51 Target: $400
 12% 

PrecacheSound second argument


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-09-2012 , 22:40   PrecacheSound second argument
Reply With Quote #1

PrecacheSound(str, false)
PrecacheSound(str, true)

When should i use second argument true or false?
I searched forum and have found that sometimes people recommend to use true, and sometimes false as second argument. And it helps in both ways.

For example this thread for true
https://forums.alliedmods.net/showthread.php?t=136438
and this one with false
http://forums.alliedmods.net/showthread.php?t=167696

confused
__________________
altex is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 03-09-2012 , 22:52   Re: PrecacheSound second argument
Reply With Quote #2

native bool:PrecacheSound(const String:sound[], bool:preload=false);

The second argument is for preloading.
Quote:
Usage:
sound Name of the sound to precache.
preload If preload is true the file will be precached before level startup.

Last edited by minimoney1; 03-09-2012 at 22:53.
minimoney1 is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-09-2012 , 22:57   Re: PrecacheSound second argument
Reply With Quote #3

sorry, i've forgotten to point it
i readed doc several times, and didn't understand "preload" term
what does it exactly do? when should i "preload" sounds and why? i was thinking precache is preload
__________________

Last edited by altex; 03-09-2012 at 23:01.
altex is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-09-2012 , 23:00   Re: PrecacheSound second argument
Reply With Quote #4

Quote:
If preload is true the file will be precached before level startup.
it realy confuses me
preaload is precache
precachesound is precache
before level startup? onmapstart called already after map is changed

sorry for maybe stupid questions..
__________________

Last edited by altex; 03-09-2012 at 23:00.
altex is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-15-2012 , 14:31   Re: PrecacheSound second argument
Reply With Quote #5

thank you
__________________
altex 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 15:21.


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