Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:Enables / disables environmental effects (ambient life + sound) and spawns ambient entities.

Syntax

Syntax:enableEnvironment ambient
Parameters:
  • ambient: Boolean - If false, then ambient life and sounds are disabled.
Return Value:Nothing

Alternative Syntax

Syntax:enableEnvironment [life,sound] (V2.06+)
Parameters:
Return Value:Nothing

Alternative Syntax #2

Syntax:enableEnvironment [life,sound,[ambientEntityName1,cost1,ambientEntityName2,cost2,...]] (V3.8.1+)
Parameters:
  • life: Boolean - If false, then ambient life is disabled.
  • sound: Boolean - If false, then ambient sounds are disabled.
  • ambientEntityName: String - One of the following ambient-entity names (case-insensitive):
    • "BIRDS"
    • "INSECTS"
    • "CLUTTER"
    • "FISH"
  • cost: Number - The wanted cost of the entities. For example, if all entities of a chosen type cost 1, then cost/1 entities are spawned. If the entities cost 5, then cost/5 entities are spawned, and so on. The cost of individual entities typically varies between 1-4. If the specified cost is smaller than the amount of entities currently in the scene, the excessive entities are deleted.
Return Value:Nothing

Examples

Examples:
enableEnvironment false;  
enableEnvironment [true,false]; 
enableEnvironment [true,true,["Birds",39,"Fish",66]]; 

Additional Information

See also: initAmbientLife
Multiplayer:
Problems:

Notes





The string value passed to the command works like a search mask.


Example: If you run this enableEnvironment [true, true, ["a", 222]]; it will allow all CfgNonAI entities with the letter a in its classname to spawn. --General Barron 10:43, 9 May 2016 (CEST)