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

EmitSound* updatePos (and some other stuff)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-19-2014 , 18:48   EmitSound* updatePos (and some other stuff)
Reply With Quote #1

So reading over any of the EmitSound* functions, I've noticed that there's an 'updatePos' parameter that's listed as "unknown".

Has anybody figured out what 'updatePos' actually does since the docs were last updated? The reason I'm asking is because FF2 sometimes sets 'updatePos' to false while leaving everything else at the usual defaults, leading in ugly lines that look something like this:
Code:
EmitSoundToAll(SOUND_DEMOPAN_RAGE, _, _, _, _, _, _, _, _, _, false);
I'd really love to get rid of that in order to make it much more nice-looking, but I just wanted to make sure that it doesn't do anything important before I do.

Also, somewhat related, and I know this has been talked about before (but I don't think a conclusion has been reached), do multiple identical EmitSounds* actually accomplish something (eg raise the volume)? Can whatever it does be accomplished using a single EmitSound*?

And finally...is there a difference between 'SNDLEVEL_NORMAL' and 'SNDLEVEL_TRAFFIC'? I don't think there is (they're both set at 75), but some confirmation would be nice .
__________________
~Wliu
Wliu is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-19-2014 , 23:35   Re: EmitSound* updatePos (and some other stuff)
Reply With Quote #2

Quote:
Originally Posted by Wliu View Post
FF2 sometimes sets 'updatePos' to false while leaving everything else at the usual defaults, leading in ugly lines that look something like this:
Code:
EmitSoundToAll(SOUND_DEMOPAN_RAGE, _, _, _, _, _, _, _, _, _, false);
I'd really love to get rid of that in order to make it much more nice-looking, but I just wanted to make sure that it doesn't do anything important before I do.
You could always do this:
Code:
EmitSoundToAll(SOUND_DEMOPAN_RAGE, .updatePos=false);
bl4nk is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-20-2014 , 11:45   Re: EmitSound* updatePos (and some other stuff)
Reply With Quote #3

Never knew that was possible. Awesome.
__________________
~Wliu
Wliu is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 11-20-2014 , 23:16   Re: EmitSound* updatePos (and some other stuff)
Reply With Quote #4

Can you do it without having to know the name 'updatepos'?

Like .9=false
__________________

Last edited by Chdata; 11-20-2014 at 23:17.
Chdata is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 11-21-2014 , 00:58   Re: EmitSound* updatePos (and some other stuff)
Reply With Quote #5

Quote:
Originally Posted by Chdata View Post
Can you do it without having to know the name 'updatepos'?

Like .9=false
No.

Also, "One may mix positional parameters and named parameters in a function call with the restriction that all positional parameters must precede any named parameters."

http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf
Page 74, toward the top
__________________
ddhoward 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 07:14.


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