Ambient generic/fr

From Valve Developer Community
Jump to: navigation, search
Info content.png
This page needs to be translated.

Cette page contient soit des informations qui ne sont que partiellement ou incorrectement traduites, soit il n'y a pas encore de traduction.
Si cette page ne peut pas être traduite pour une raison quelconque, ou si elle reste non traduite pendant une période prolongée après la publication de cet avis, il convient de demander la suppression de la page.

Veillez également à ce que l'article respecte le guide des langues alternatives.
Info content.png
This translated page needs to be updated.

Cette page traduite doit être mise à jour.

Vous pouvez aider en mettant à jour la traduction.

Veillez également à ce que l'article respecte le guide des langues alternatives.

Entitée point disponible pour tous les jeux Source.

Permet de jouer un son unique ou en boucle (ne fonctionne plus sous CSS). Les mp3 en hautes qualitées (44100Hz) sont reconnu, mais ne fonctionne pas sous l'explorateur de son sous hammer. Cette entitée ne fonctionne pas avec le DSP.

Icon-Bug.pngBug:Les sons en boucles peuvent seulement être jouer avec un WAV et une entité logic_auto, sinon ils ne seront joué qu'une seul fois au début du chargement de la map.

Les sons émis sont localisé la ou se situe l'entité, et diminue avec la distance. Cette entités à une zone d'écoute au dela vous n'entendrez plus le son.

Use it to play and control a soundscript sound, a raw .wav sample or a single scripted sentence. In case of a scripted sentence you have to replace the path and filename with "!", followed by the sentence name.


  • Note : Cette entité n'est plus destiné à être utilisée pour les sons environementaux. Utilisé pour cela la nouvelle entitée env_soundscape. Ambient_generic est largement conservé pour jouer les son uniques, trigger avec par exemple un logic_timer ou les musics.


Bugs de son en boucle

Ce problème de son en boucle instoppable peut être corrigé en incluant ceci dans votre mods.

Details

Flags

1 - Play everywhere
le son est joué avec toutes les encientes au volume choisis. Le DSP ne l'influe pas.
16 - Start Silent
La map démarre sans jouer le son. Activer par défault.
Icon-Bug.pngBug:Les sons en boucle qui n'on pas ce flag cocher ne démareront pas.
32 - Is NOT Looped
Il est impotant de bien choisir la valeur ici ou le son ne démarera pas ou ne stopera pas.


Keyvalues


Base:
Name (targetname) <string>
The name that other entities use to refer to this entity.
Parent (parentname) <targetname>
Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (parentname [targetname],[attachment])
Tip.pngAstuce:Entities transition to the next map with their parents
Tip.pngAstuce:phys_constraint can be used as a workaround if parenting fails.
Origin (X Y Z) (origin) <coordinates>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Note.pngNote:Hammer does not move the entities accordingly only in the editor.
Pitch Yaw Roll (X Y Z) (angles) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Note.pngNote:This works on brush entities, although Hammer doesn't show the new angles.
Classname (classname) <string> !FGD
Determines the characteristics of the entity before it spawns.
Tip.pngAstuce:Changing this on runtime still has use, like making matching an entry in S_PreserveEnts will persist the entity on new rounds!
Flags (spawnflags) <flags> !FGD
Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.
Effects (effects) <flags> !FGD
Combination of effect flags to use.
Entity Scripts (vscripts) <scriptlist> (in all games since Left 4 Dead 2) (aussi dans Team Fortress 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions. Scripts executed on the worldspawn entity will be placed in root scope.
Think function (thinkfunction) <string> (in all games since Left 4 Dead 2) (aussi dans Team Fortress 2)
Name of the function within this entity's script that'll be called automatically every 100 milliseconds, or a user-defined interval if the function returns a number. Avoid expensive operations in this function, as it may cause performance problems.
Lag Compensation (LagCompensate) <boolean> (in all games since Left 4 Dead 2) !FGD
Set to Yes to lag compensate this entity. Should be used very sparingly!
Is Automatic-Aim Target (is_autoaim_target) <boolean> (in all games since Counter-Strike: Global Offensive) !FGD
If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.
message
<sound> Name of the GameSound entry for the sound to play. Also supports raw .wav filenames and sentence scripts.
health (Volume)
<integer:0-10> Sound volume, expressed as a range from 0 to 10, where 10 is the loudest. Defaults to 10.
preset
Literal Value Dynamic Preset
0 None
1 Huge Machine
2 Big Machine
3 Machine
4 Slow Fade in
5 Fade in
6 Quick Fade in
7 Slow Pulse
8 Pulse
9 Quick pulse
10 Slow Oscillator
11 Oscillator
12 Quick Oscillator
13 Grunge pitch
14 Very low pitch
15 Low pitch
16 High pitch
17 Very high pitch
18 Screaming pitch
19 Oscillate spinup/down
20 Pulse spinup/down
21 Random pitch
22 Random pitch fast
23 Incremental Spinup
24 Alien
25 Bizzare
26 Planet X
27 Haunted
volstart
<integer> Volume to start fading in at.
fadein [deprecated]
<integer> Fade in time (0-100)
fadeout [deprecated]
<integer> Fade out time (0-100)
fadeinsecs (in all games since Half-Life 2: Episode One)
<integer:0-100> How long to fade in for.
fadeoutsecs (in all games since Half-Life 2: Episode One)
<integer:0-100> How long to fade out for. Will delay any StopSound inputs to allow for the fade.
pitch
<integer:1-255> Sound pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch.
pitchstart
<integer:1-255> Pitch to begin spinning up at.
spinup (Spin up time)
<integer:0-100>. Analogous to fadeinsecs, but affecting pitch.
spindown (Spin down time)
<integer:0-100>. Analogous to fadeoutsecs, but affecting pitch.
lfotype
<integer> LFO type
Literal Value LFO type
0 Off
1 Square Wave (alternate between low and high)
2 Triangle Wave (sharper transitions)
3 Random
lforate (LFO rate)
<integer:0-1000> How frequently the LFO effect repeats itself.
lfomodpitch (LFO modulation - pitch)
<integer:0-100>, affects the sound pitch or vibrato. Higher numbers change the pitch more - warbling singers use little, police sirens use a lot.
lfomodvol (LFO modulation - volume)
<integer:0-100> Affects the volume of the sound, causing it to "pulse." Similar to tremolo.
cspinup (Incremental Spinup Count)
<integer> Appears to be a method for increasing pitch in time with ToggleSound inputs, but:
Icon-Bug.pngBug:Non-functional.
radius (Max Audible Distance)
<string> Maximum distance at which this sound is audible.
Icon-Bug.pngBug:Non-functional.
SourceEntityName
<targetname> If an entity is specified, sound will come from this named entity instead of the location of ambient_generic. If the target is an NPC capable of lipsynching, and phoneme data is found within the sound, the target will lipsynch to it.

Inputs


  • Base:
AddContext <string>
Adds to the entity's list of response contexts. See Context.
AddOutput <string>
Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"

// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
ClearContext
Removes all contexts from this entity's list.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
FireUser1 to FireUser4
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKillinput.
RemoveContext <string>
Remove a context from this entity's list. The name should match the key of an existing context.
SetParent <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Use  !FGD
Same as a player invoking +use; no effect in most cases.
DispatchResponse <string> !FGD
Dispatches a response to the entity. See Response and Concept.
DispatchEffect <string> (retiré depuis Left 4 Dead) !FGD
Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since Left 4 Dead.
RunScriptFile <script> (depuis Left 4 Dead 2) (aussi dans Team Fortress 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (depuis Left 4 Dead 2) (aussi dans Team Fortress 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Icon-Bug.pngBug:In Hammer, using string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.
Note.pngCorriger:Remove the string argument manually with a text editor.
Note.pngNote:Team Fortress 2 Backtick characters ` are replaced with quotation marks at runtime, allowing quotation marks to be used when normally not possible.
CallScriptFunction <string> (depuis Left 4 Dead 2) (aussi dans Team Fortress 2) !FGD
Calls a VScript function defined in the scope of the receiving entity.
TerminateScriptScope  (seulement dans Team Fortress 2) !FGD
Destroys the script scope of the receving entity.
SetLocalOrigin <coordinates> (depuis Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles> (depuis Alien Swarm) !FGD
Set this entity's angles.
Pitch <integer>
Sets the sound pitch, expressed as a range from 1 to 255, where 100 is the sound's original pitch.
Icon-Bug.pngBug:Pitch will play the sound without informing the rest of the entity. This makes looping sounds unstoppable! It is speculated that the input is supposed to change the pitch at which the ambient_generic plays its sound when prompted by other inputs, not play it by itself.
PlaySound
Starts the sound.
StopSound
Stops a looping sound.
Note.pngNote:Does not stop a non-looping sound. This is intentional, and can be changed with C++.
ToggleSound
Toggles a looping sound between playing and stopped. Behaves like PlaySound if the sound is unlooped.
Volume <integer>
Plays the sound at a volume from 0 to 10, where 10 is the loudest.
Icon-Bug.pngBug:Volume will play the sound without informing the rest of the entity. This makes looping sounds unstoppable! It is speculated that the input is supposed to change the volume at which the ambient_generic plays its sound when prompted by other inputs, not play it by itself.
FadeIn <integer> (in all games since Half-Life 2: Episode One)
Fades the sound up to full volume over a specified number of seconds, with a range from 0 to 100 seconds.
Icon-Bug.pngBug:Non-functional.
FadeOut <integer> (in all games since Half-Life 2: Episode One)
Fades the sound to silence over a specified number of seconds, with a range from 0 to 100 seconds.
Icon-Bug.pngBug:Will bring the sound up to full volume (i.e. 10) before beginning to fade it.

Outputs

  • Base:
OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.

External links