English Weapon Deploy/Draw Sound Effect icon

9 comments
25.08.23 08:09:32 am
like 3 like it!
134 kb, 13 Downloads
Cure Pikachu
User
Offline Off
What this script basically does is attempt (as much as possible) to emulate the sound effects that the Counter-Strike games make of you drawing/chambering your weapon whenever you switch into it. Also comes with an additional sound effect of you actually placing the bomb down when you successfully plant it.

No screenshots are provided! This script has nothing for you to experience visually; it's purely auditory.

> Installation
• Extract archive to CS2D directory, maintaining folder structure
• Copy the contents in servertransfer_wpnsnds.lst and append them into your own servertransfer.lst, otherwise other players who do not have the sounds can't hear them

> Customization
Weapon List >

These are the remaining settings:
Code:
pikachu.wpnsnds.teamonly = true -- Teammates only?
pikachu.wpnsnds.teamrange = 320 -- Distance check in pixels
pikachu.wpnsnds.teamspec = true -- Extend to dead players spectating?

•
pikachu.wpnsnds.teamonly
determines who else nearby can hear the weapon drawing sound effects you make.
true
for teammates only (default setting),
false
for everyone (using cs2d cmd sv_soundpos).
•
pikachu.wpnsnds.teamrange
determines how far approximately (in pixels) teammates can be from you to be able to hear you switching your weapon. The default value is 320 and the minimum value is 1 (Just to be safe, there is an error check in place).
•
pikachu.wpnsnds.teamspec
determines whether dead people or spectators are able to hear the weapon drawing sound effects you make if they focus on you or your nearby teammates. Setting it to
true
enables this (default setting).

Changelog >


P.S. I looked around the file archive earlier and was baffled by the non-existence of a script like this, I will have figured someone published their own version by now
edited 99×, last 05.09.23 03:58:15 pm
ok This file has been reviewed and approved by DC (26.08.23 09:03:19 pm)

Comments

9 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
30.08.23 12:27:50 am
Up
Cure Pikachu
User
Offline Off
@user Gaios: Right, what do you think of this?
More >
edited 3×, last 30.08.23 01:53:24 am
29.08.23 11:57:26 pm
like I like it!
Up
Gaios
Reviewer
Offline Off
file cs2d Weapon Deploy/Draw Sound Effect (3) has written:
FIXED The distance check formula used to check for nearby teammates was bugged (forgot to square the
y
value lol), replaced with something more modern: cs2d lua cmd closeplayers

I think you should consider caching player positions (eg. by cs2d lua hook tile - don't need to be accurate) and then use native Lua function to calc distance (or better: calc if position is within the distance)
Code >

Too many calls to CS2D's API in single frame will lead to TPS drops. Also the hook could be disabled if configuration for spec players is disabled.
player(0, 'table')
should definitely be cached, for example by cs2d lua hook connect and cs2d lua hook disconnect hooks.
29.08.23 04:17:46 am
like I like it!
Up
cs2d_is_a_Gem
User
Offline Off
always excellent cure pikachu
28.08.23 02:02:46 pm
like I like it!
Up
Gaios
Reviewer
Offline Off
Ok, I like it
28.08.23 01:29:23 pm
Up
Cure Pikachu
User
Offline Off
3D Counter-Strike analogy it'd be like the SFX of you chambering your AK or M4 whenever you switch to it (the weapon draw animation)
28.08.23 01:26:29 pm
like I like it!
Up
Gaios
Reviewer
Offline Off
Yes, and what does add yours?
28.08.23 01:14:49 pm
Up
Cure Pikachu
User
Offline Off
@user Gaios: Is there? I am only aware of the clipin and clipout ones, which are just for reloading
28.08.23 12:56:50 pm
like I like it!
Up
Gaios
Reviewer
Offline Off
CS2D has native support for such sounds.
28.08.23 02:18:16 am
like I like it!
Up
zazz
User
Offline Off
Pretty cool actually, it's so satisfying lol
To the start Previous 1 Next To the start