Forum

> > CS2D > Scripts > sv_soundpos
Forums overviewCS2D overview Scripts overviewLog in to reply

English sv_soundpos

5 replies
To the start Previous 1 Next To the start

old sv_soundpos

Promaster
User Off Offline

Quote
How does "sv_soundpos" works? And yes, i have already read "http://cs2d.com/help.php?cat=all&cmd=sv_soundpos#cmd" but still have no clue how it works?
x (0-X): x position (in pixels)
y (0-X): y position (in pixels)

(0-X) ?

old Re: sv_soundpos

Rainoth
Moderator Off Offline

Quote
It's just a bug in documentation. Don't mind it.
Here's an example
1
parse("sv_soundpos thatstheway.wav 420 777")
or
1
parse("sv_soundpos "..sound.." "..x.." "..y)
where
sound is your song/music file path (relative to sfx folder)
x and y is the position on the map

Of course there's optional parameter but you probably won't need it.

old Re: sv_soundpos

Promaster
User Off Offline

Quote
@user Rainoth: Thank you for quick answer!
I want to make a specific sound on a specific area, how do i do that?
Is it possible to stop a current playing sound when i used sv_sound2

old Re: sv_soundpos

GeoB99
Moderator Off Offline

Quote
cs2d cmd sv_soundpos already does the job for you at playing a specific sound in specific area. What it is required to do so is the X and Y path coordination of your map.

One thing that it's unfortunately impossible is stopping a certain sound (or if I remember DC mentioned somewhere he'll add a command for that, don't know). For this, you'd rather use sounds with a shorter duration.

old Re: sv_soundpos

Yates
Reviewer Off Offline

Quote
0 - X means from the value 0 to X, X in this case is basically infinite (unless CS2D has a maximum map size I do not know about).

It's not a bug in the documentation, it's telling you the value range.

old Re: sv_soundpos

Rainoth
Moderator Off Offline

Quote
@user Yates: Oh. I assumed it was something like (0 to X) regarding x axis of the map and then (0 to Y) regarding the y axis of the map.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview