ambient_generic
< Hr
![Info content.png](/w/images/f/f6/Info_content.png)
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article tries to comply with the alternate languages guide.
The following content or section specifically needs to be translated:
Keyvalues need to be translated. Also change links to
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article tries to comply with the alternate languages guide.
The following content or section specifically needs to be translated:
Keyvalues need to be translated. Also change links to
{{L}}
, {{LCategory}}
etc.![Ambient generic.png](/w/images/e/e1/Ambient_generic.png)
ambient_generic
je Točkasti entitet dostupan u svim Source igrama.
![]() |
---|
CAmbientGeneric |
![]() sound.cpp
|
Ovaj entitet reproducira zvuk, bilo jednom ili u petlji i bilo s lokacije u svijetu ili globalno. Koristite ga za reprodukciju i kontrolu zvuka zvučnog skripta, neobrađeni WAV, MP3, i
OGG ili
FLAC uzorak, ili
scripted_sentence
.
Greške/Ograničenja
![Tip.png](/w/images/thumb/4/45/Tip.png/9px-Tip.png)
parentname
ili unos SetParent
, iako nisu navedeni u FGD-u.![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
ambient_generic
neće ažurirati svoju poziciju dok se zvuk reproducira ako je nadređen.![PlacementTip.png](/w/images/thumb/c/cc/PlacementTip.png/14px-PlacementTip.png)
![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
ambient_generic
koristi se za reprodukciju ponavljajućih zvukova u ![Counter-Strike: Source](/w/images/thumb/a/ad/Css_icon.png/16px-Css_icon.png)
logic_auto
, ili će prestati igrati kada počne prva runda.![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
![Cpp-16px.png](/w/images/thumb/5/53/Cpp-16px.png/10px-Cpp-16px.png)
![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
ambient_generic
sviranja odjednom uzrokovat će globalno oštećenje zvučnog mehanizma i potencijalno izazvati ekstremno kašnjenje! To se događa ako se dosegne unutarnje ograničenje zvuka entiteta od 64 (32 u ![Counter-Strike: Global Offensive](/w/images/thumb/8/85/Csgo_icon.png/16px-Csgo_icon.png)
ambient_generic
još uvijek "svira" kada je izvan maksimalne udaljenosti, čak i ako je ne čuje klijent.![PlacementTip.png](/w/images/thumb/c/cc/PlacementTip.png/14px-PlacementTip.png)
env_soundscape
(koji se ubrajaju u drugu statičku granicu od 64) gdje je to moguće i nasilno onemogućiti sve zvukove koji još nisu potrebni za reprodukciju. Količina zvukova koji se trenutno reproduciraju može se vizualizirati pomoću snd_show
naredba.![Icon-Bug.png](/w/images/thumb/b/b4/Icon-Bug.png/10px-Icon-Bug.png)
StopSound
ulaza.![Note.png](/w/images/thumb/c/cc/Note.png/10px-Note.png)
![Warning.png](/w/images/thumb/c/cb/Warning.png/10px-Warning.png)
Primjer: U
![Left 4 Dead 2](/w/images/thumb/8/8b/Icon-L4D2.png/16px-Icon-L4D2.png)
dlc.Generator_start_run_loop
je postavljen da se reproducira posvuda, ali na nižoj glasnoći čak i ako nije postavljeno "Sviraj svugdje". Ali koristeći svoj neobrađeni zvuk Generator_start_run_loop.wav
radi kako je predviđeno.Ključne vrijednosti
- Sound Name
(message)
<string > - The soundscript name of, or direct path to, the sound to play. For
scripted_sentence
s, type "!" followed by the sentence name. (Example: !COMBINE_THROW_GRENADE4)Napomena:Playing music without a soundscript is not recommended due to a bug with the Play Everywhere flag.
Napomena:Using any sound characters in a direct path is, in a way, a soundscript.
- Max Audible Distance
(radius)
<float > - Maximum distance in units at which the sound plays for a client.
Greška:The sound still actually plays outside the distance. [todo tested in?]
Napomena:Volume fades to nothing as the player approaches this distance, which can make it seem as if the sound stops playing too early.
Napomena:Determines the soundlevel for raw sounds. Soundlevel is
SNDLVL_70dB
at the default value of 1250. - SourceEntityName
(SourceEntityName)
<targetname > - If specified, the sound will play from this entity instead of the
ambient_generic
. If the target is an NPC capable of lipsynching, and phoneme data is found within the sound, the target will lip-sync to it.Greška:If the
ambient_generic
isKill
ed, the sound will play at the origin of the map (at 0,0,0). [todo tested in?]Greška:The entity must be spawned at map start, or else the sound will play at the location of the
ambient_generic
. [todo tested in?]Greška:Using
AddOutput
to assign theSourceEntityName
after the entity spawns does not work. [todo tested in?]Greška:Multiple
ambient_generic
s won't stack on the same entity. [todo tested in?]Napomena:An
ambient_generic
will only play from a single entity. If there are multiple entities with the same target name, the sound will only play from the first one it finds. - Volume
(health)
<integer 0–10> - How loud to play the sound. 0 is silent and 10 is normal. Default is 10.
Savjet:This keyvalue doesn't allow decimals, but the
Volume
input does.Savjet:Sounds may be hard to hear even at full volume. Naming custom sounds according to the soundmixer can be used to make them naturally louder (or quieter).
Greška:The sound does not play at all if the volume is 0. [todo tested in?]
- Start Volume
(volstart)
<integer 0–10> - Fade in time in seconds
(fadeinsecs)
<integer 0–100> - Fade out time in seconds
(fadeoutsecs)
<integer 0–100> - How long to spend fading in and out, and what volume to start at. Default is no fading.
- Pitch
(pitch)
<integer 0–255> - Pitch, where 1 is low, 100 is normal, and 255 is high.
Greška:Very high or very low values can cause other sounds to be distorted. [todo tested in?]
- Start pitch
(pitchstart)
<integer 0–255> - Spin up time
(spinup)
<integer 0–100> - Spin down time
(spindown)
<integer 0–100> - How long to spend spinning pitch up/down at the start/end of playback, and what pitch to start at. Default is no spinning.
- Dynamic Presets
(preset)
<choices> - Various DSP effects that can be applied.
- LFO type
(lfotype)
<integer > - Type of Low Frequency Oscillation to employ.
- 0. Off (default)
- 1. Square Wave (alternate between low and high)
- 2. Triangle Wave (crossfade between high and low)
- 3. Random
- LFO rate
(lforate)
<integer 0–1000> - How frequently the LFO effect repeats itself.
- LFO modulation - pitch
(lfomodpitch)
<integer 0–100> - Affects the sound pitch or vibrato. Higher numbers change the pitch more; warbling singers use little, police sirens use a lot.
- LFO modulation - volume
(lfomodvol)
<integer 0–100> - Affects the volume of the sound, causing it to "pulse." Similar to tremolo. At a really high rate, this can make the same effect as talking through fan blades.
- Incremental Spinup Count
(cspinup)
<integer > - Appears to be a intended to increase pitch in time with
ToggleSound
inputs.Greška:Non-functional. [todo tested in?]
- m_bDontModifyPitchVolOnSpawn
(m_bDontModifyPitchVolOnSpawn)
<choices> (samo u)
- When the 'Start Silent' flag is left unchecked, a SOUNDSCRIPTED ambient_generic will first pull its pitch & volume values from inside the entity itself upon map load/spawn, and NOT from what's dictated in the actual soundscript. This option, when enabled, will prevent this from happening and ensure no discontinuity occurs when toggling the sound off and on again. (Set to Disabled by default)
- 0: Disabled
- 1: Enabled
Unosi
Pitch
<integer >- Postavlja visinu zvuka, izraženu kao raspon od 1 do 255, gdje je 100 izvorna visina zvuka.
Greška:Pitch će reproducirati zvuk bez obavještavanja ostatka entiteta. Ovo čini zvuk petlje nezaustavljivim!. [todo tested in?]
PlaySound
- Pokreće zvuk.
StopSound
- Zaustavlja ponavljajući zvuk. Zaustavlja li ne zvuk koji se ne ponavlja; međutim, zvuk koji se ne ponavlja može se zaustaviti korištenjem ulaza Volume s vrijednošću 0.
Popravak koda:Ako je potrebno, možete dopustiti ovom ulazu da zaustavi zvuk koji se ne ponavlja putem C++.
ToggleSound
- Prebacuje ponavljajući zvuk između reprodukcije i zaustavljanja. Ponaša se kao
PlaySound
ako se zvuk ne ponavlja.
Volume
<float >- Reproducira zvuk na glasnoći od 0 do 10, gdje je 10 najglasniji.
Greška:Volume će reproducirati zvuk bez obavještavanja ostatka entiteta. Ovo čini zvuk petlje nezaustavljivim! Nagađa se da bi unos trebao promijeniti glasnoću na kojoj se
ambient_generic
reproducira svoj zvuk kada ga zatraže drugi ulazi, a ne reproducira ga sam. [todo tested in?]Napomena:Postavljanje glasnoće na 0 uzrokovat će pauzu zvuka, umjesto tihe reprodukcije.
FadeIn
<integer >- Pojačava zvuk do pune glasnoće tijekom određenog broja sekundi, s rasponom od 0 do 100 sekundi.
Napomena:U
Portal 2 potrebno je da se zvuk barem jednom ugasi prije nego što ovaj unos ima bilo kakav učinak.
FadeOut
<integer >- Utišava zvuk tijekom određenog broja sekundi, u rasponu od 0 do 100 sekundi.
Greška:Pojačat će zvuk do pune glasnoće (tj. 10) prije nego što ga počne stišavati. [todo tested in?]
Zastave
- [
1
] : Play everywhere
Zvuk se reproducira konstantnom glasnoćom, bez obzira koliko je slušatelj udaljen od izvora zvuka.Napraviti: Kako ovo djeluje na otkrivanje zvukaenv_microphone
?
Greška:Ova zastavica is broken at engine level za zvukove reproducirane iz Soundscripts. Radit će samo kada se zvuk reproducira s neobrađenim nazivom datoteke. [todo tested in?]
- [
16
] : Start Silent
Karta će se pokrenuti bez ovog zvuka. Omogućeno prema zadanim postavkama.Greška:Zvukovi u petlji koji ne počinju tiho ne mogu se kontrolirati! [todo tested in?]
- [
32
] : Is NOT Looped
Mijenja način na kojiambient_generic
obrađuje zaustavljanje i pokretanje reprodukcije. To neće zaustaviti petlju zvuka, ali još uvijek je vrlo važno postaviti ga na pravu vrijednost. Možda nećete moći zaustaviti i/ili pokrenuti zvuk ako nije!Greška:Označavanje ove opcije tijekom korištenja zvuka u petlji Spriječit će vas da ga kontrolirate! [todo tested in?]
- [
64
] : Do NOT Pause when game is Paused (samo u)
Nemojte pauzirati zvuk kada je igra pauzirana.
Vidi također
- Podesite ambient_generic glasnoću veću od 10 (Vodič za napredno mapiranje)
env_soundscape
- koristi se za reprodukciju mnogih ambijentalnih/pozadinskih zvukova iz jednog entiteta putem skripte.music_track
- koristi se za dinamičku reprodukciju glazbe uBlack Mesa.
- ponavljanje zvuka - što zahtijeva modificiranje stvarne
.wav
datoteke - Postavljanje
ambient_generic
s u Counter-Strike: Source pomoćulogic_auto
- zamjena za stvaranje pravilnogenv_soundscape
.