Dateien

> > CS2D > Lua Scripts > Weapon Deploy/Draw Sound Effect
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Weapon Deploy/Draw Sound Effect >

9 Kommentare134 kb, 39 Downloads

alt Weapon Deploy/Draw Sound Effect

Cure Pikachu
User Off Offline

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:
-- Teammates only?
pikachu.wpnsnds.teamonly = true
-- Distance check in pixels
pikachu.wpnsnds.teamrange = 400
-- Extend to dead players spectating?
pikachu.wpnsnds.teamspec = true
-- Use exact player position instead of cache for distance checking?	
pikachu.wpnsnds.precisepos = false

•
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 400 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).
•
pikachu.wpnsnds.precisepos
determines whether player positions for distance checks will be precise (i.e. use the players' x and y coordinates during the checks themselves) if
true
, otherwise it will instead use a system that caches player positions to the nearest tile (default is
false
)

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
108× editiert, zuletzt 11.01.24 14:12:16
Zugelassen von DC

Download Download

134 kb, 39 Downloads

Kommentare

9 Kommentare
Zum Anfang Vorherige 1 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

Cure Pikachu
User Off Offline

@user Gaios: Right, what do you think of this?
Mehr >
3× editiert, zuletzt 30.08.23 01:53:24

alt

Gaios
Reviewer Off Offline

file cs2d Weapon Deploy/Draw Sound Effect hat geschrieben
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.
Ich mag es!

alt

cs2d_is_a_Gem
User Off Offline

always excellent cure pikachu
Ich mag es!

alt

Gaios
Reviewer Off Offline

Ok, I like it
Ich mag es!

alt

Cure Pikachu
User Off Offline

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)

alt

Gaios
Reviewer Off Offline

Yes, and what does add yours?
Ich mag es!

alt

Cure Pikachu
User Off Offline

@user Gaios: Is there? I am only aware of the clipin and clipout ones, which are just for reloading

alt

Gaios
Reviewer Off Offline

CS2D has native support for such sounds.
Ich mag es!

alt

zazz
User Off Offline

Pretty cool actually, it's so satisfying lol
Ich mag es!
Zum Anfang Vorherige 1 Nächste Zum Anfang