|
Modding Tutorials Information and tutorials related to modding BF2. |
|
Thread Tools | Display Modes |
2016-12-19, 08:28 | #1 |
PR:BF2 Developer
|
How to manually fix Ambient Objects
This is a guide on how to format and fix your Ambient Objects manually. It's recommended to first use the BF2Editor to load your level to look at the debugger logs.
Creating trigger(able)s Tutorial by Harry from BF2Editor: http://www.bfeditor.org/forums/index...-triggerables/ The 3 things that need to be created in order are: a) Trigger which creates the settings of a player triggered radius where a player can fire, move, time (wait), or explode an area to trigger the ambient effect. Marked as blue in the editor. b) Ambient Effect Area which defines the effect properties of the Trigger. Must have _AmbientEffect attached to the trigger name. Marked as red in the editor. c) Ambient Sounds (Or Ambient Sound Effects) which defines the atmospheric sounds that will play on all parts of the map, and even in certain parts like in a creek environment. Marked as green in the editor. 1. Trigger. ObjectTemplate.create Trigger [Object] -> object.Create The purpose of ObjectTemplate.create Trigger is to define the Trigger ID, and the properties of the soldier trigger.
The type of trigger. There are 4 types, and in ObjectTemplate.events, add the following numbers (inside "[]"):
After the Trigger is defined, the object needs to be created with Object.create using the same name to be placed on the map. It uses the absolute position, rotation and the layer the trigger is for. Example: Code:
rem [TriggerTemplate: Trigger_birds1] rem *********** TriggerTrigger *********** rem [TriggerTemplate: Trigger_birds1] ObjectTemplate.create Trigger Trigger_birds1 ObjectTemplate.activeSafe Trigger Trigger_birds1 ObjectTemplate.modifiedByUser esj ObjectTemplate.isNotSaveable 1 ObjectTemplate.hasMobilePhysics 0 ObjectTemplate.triggerId 1 ObjectTemplate.radius 30 ObjectTemplate.events 10 ObjectTemplate.averageTimeBetweenTests 1 ObjectTemplate.chance 0.5 ObjectTemplate.minimumTimeBetweenTriggering 30 rem [Trigger: Trigger_birds1] Object.create Trigger_birds1 Object.absolutePosition 82.964/153.389/-19.101 Object.rotation 0.000/0.000/0.000 Object.layer 1 The purpose of AmbientEffectArea is to define the radius of the effect, what effect is used, the properties of the effect. AmbientEffects must have the _AmbientEffect line added otherwise it won't work. Best way to add it is to search for the effect, and replace with the effect name and the _AmbientEffect.
Code:
rem ********** AmbientEffectArea ********** rem TriggerID needs to be the same as the TriggerTrigger rem [AmbientEffectAreaTemplate: Trigger_birds1_AmbientEffect_1] ObjectTemplate.create AmbientEffectArea Trigger_birds1_AmbientEffect_1 ObjectTemplate.activeSafe AmbientEffectArea Trigger_birds1_AmbientEffect_1 ObjectTemplate.modifiedByUser esj ObjectTemplate.isNotSaveable 1 ObjectTemplate.hasMobilePhysics 0 ObjectTemplate.radius 2 ObjectTemplate.triggerId 1 ObjectTemplate.numNetworkedEffects 1 ObjectTemplate.projectOnHeightmap 0 ObjectTemplate.linkedEffectContainer e_dAmb_bird rem [AmbientEffectArea: Trigger_birds1_AmbientEffect_1] Object.create Trigger_birds1_AmbientEffect_1 Object.absolutePosition 83.191/159.486/-19.643 Object.rotation 0.000/0.000/0.000 Object.layer 1 The purpose of Ambient Sounds is to define both the sound effects to play throughout the map, like a wind or rain sound and the sound to play at specific areas.
Code:
Example: rem ************ AmbientSounds ************ Below is the global ambient sound played throughout the level: rem [SoundObjectTemplate: S_GlobalAmbient] ObjectTemplate.create Sound S_GlobalAmbient ObjectTemplate.activeSafe Sound S_GlobalAmbient ObjectTemplate.modifiedByUser esj ObjectTemplate.lowSamples 2147483647 ObjectTemplate.mediumSamples 2147483647 ObjectTemplate.soundFilename "common/sound/levelambients/dalian_plant/dalian_plant_global_ambience.ogg" ObjectTemplate.loopCount 0 ObjectTemplate.is3dSound 0 ObjectTemplate.stopType 0 ObjectTemplate.volume 0.74 ObjectTemplate.pitch 1 ObjectTemplate.pan 0.5 ObjectTemplate.reverbLevel 0 ObjectTemplate.minDistance 300000 Sound.addTrigger S_GlobalAmbient Code:
rem [SoundObjectTemplate: S_Carrier_Ambience_1] ObjectTemplate.create Sound S_Carrier_Ambience_1 ObjectTemplate.activeSafe Sound S_Carrier_Ambience_1 ObjectTemplate.modifiedByUser esj ObjectTemplate.isNotSaveable 1 ObjectTemplate.lowSamples 2147483647 ObjectTemplate.mediumSamples 2147483647 ObjectTemplate.soundFilename "common/sound/levelambients/gulf_of_oman/carrier_ambient.ogg" ObjectTemplate.loopCount 0 ObjectTemplate.is3dSound 0 ObjectTemplate.stopType 0 ObjectTemplate.volume 1 ObjectTemplate.pitch 1 ObjectTemplate.pan 0.5 ObjectTemplate.reverbLevel 0 ObjectTemplate.position 776.031/155.718/77.343 ObjectTemplate.minDistance 50 Sound.addTrigger S_Carrier_Ambience_1 Object.create S_Carrier_Ambience_1 Object.absolutePosition 776.031/155.718/77.343 Object.rotation 0.000/0.000/0.000 Object.layer 1 After loading, go to the resources bar and open Ambient. Go to AmbientTrigger, click on the sub-folder and click on each effect. On the right, under level settings, there's the Minimap section. Click on Show. Then load the level up in-game, and test each AmbientEffect pointed out in the Editor. After clicking on a new trigger, you may need to move the camera for the position in the minimap to update each time though. Hope this helps! |
|
|
Last edited by Arab; 2018-08-17 at 03:05..
|
Tags |
ambient, ambientobjectscon, fix, manually, mapping, modify, objects, tutorial, wip |
|
|