Below shows an example config to add SFX option to any prop or object. Please note, It needs to inherit the FOLDER_SFX_BASECLASS otherwise it will not work.
class Land_PREFIX_OBJECT_NAME: FOLDER_SFX_BASECLASS //INHERITING FROM BASE CONFIGS IN CONFIG.CPP
{
scope = 2;
displayName = "EDEN DISPLAY NAME";
_generalMacro = "Land_OBJECT_NAME";
author = "AUTHORS_NAME";
editorPreview = "DIRECTORY\UI\PREFIX_OBJECT_NAME.jpg";
model = "DIRECTORY\PREFIX_OBJECT_NAME.p3d";
class Attributes
{
class CYT_Obj_Common_SFX : CYT_Obj_Common_SFX //INHERITING FROM BASE CONFIGS IN CONFIG.CPP
{
defaultValue=true; // SETS THE DEFAULT VALUE FOR THE SFX TO ALWAYS BE ON
};
class CYT_Obj_Common_SFX_Percentage : CYT_Obj_Common_SFX_Percentage //INHERITING FROM BASE CONFIGS IN CONFIG.CPP
{
defaultValue=0.625; // SETS INDIVIUAL DEFAULT VALUE PROBABILITY
};
};
class EventHandlers //SWITCH DEPNDING ON TYPE OF OBJECT AND PARAMETERS NEEDED
{
init = "_this#0 setVariable ['Common_SFX_Types', ['EFFECT_NAME']];"; // CAN SELECT ONLY ONE
//init = "_this#0 setVariable ['Light_SFX_Types', ['EFFECT_NAME','EFFECT_NAME','EFFECT_NAME','EFFECT_NAME']];"; //CAN SELECT MULTIPLE
};
};
Below shows an example config for the attributes that control the SFX activation.
class CfgCytech
{
class Common_SFX
{
class Common_execute_SFX
{
class default_sfx // SFX Type
{
triggerRange = 100; // Triggers SFX if player is in range
execRange = 50; // this is added to the triggerRange and executs the SFX in this Range
synchronized = false; // Synchronized execution on all Players
repeated = false; // Repeated execution of the Effect
repeatSleep[] = {30,180}; // Time {min,max} in sec inbetween each Execution (only needed if repeated = true)
execProbability = 1; // Execution Probability each Cycle [0-1](0%-100%) (only needed if synchronized and/or repeated = true)
execServer = false; // Execution true = only on Server, false = only on Players
};
};
};
};
Once the above attributes have been met, it will then call the same SFX spawning script. Below is a list of all availible options for lights.
- dust_wallmedium
- dust_suspension
- dust_bigflow
- dust_light
- dust_falling
- fire_display
- fire_1m
- fire_2m
- fire_3m
- fire_4m
- fire_barreldim
- fire_barrelsmally
- fire_leak
- fog_low
- fog_medium
- fog_big
- waterleak_display
- waterleak_drops
- waterleak_smallpipe
- blood_leak
- drop_object // Only Server Creation
- drop_unit // Only Server Creation
- roadflare
- sound_windtunnel
- sound_phonering
- sound_deviceroom
- sound_rats
- sound_pebble
- sound_leak
- sound_laserbeam
- sound_cistern
- sparks_electric
- sparks_light
- sparks_wall
- steam_wallsmall
- steam_floorsmall
- steam
- coffee_machine
- kola_machine
- containerholder
- conditioning_01
- conditioning_02
- conditioning_03
- conditioning_05
- vent_big
- vent_wall
- vent_wall2
- vent_small
- pipe_ventiel
- pipe_square
- pipe_square_simple
- flare
- flare_dim
- office_aircon
- pipe_cover
- grate3_floor
PLEASE NOTE SOME SFX TYPES MIGHT NOT WORKING AS THEY MAY NEED CERTAIN MEMORY POINTS ON THE MODEL