Jump to content
Sign in to follow this  
CarlGustaffa

A mystery object in the mass grave object

Recommended Posts

Whenever you place a mass grave on the map, you'll find hint str a to reveal a mystery "#dynamicsound" object. What is this, and should the object be globally accessible in the first place or is this a bug?

Domination places mass graves in the mission, and I have an object named a for debugging purposes. So when I did "player setPos getPos a" and was teleported to the target, I was shocked :D I've since renamed my object to obj though :p

And what's this "#dynamicsound" thingie? Is it similar to "#lightpoint" in any way, like a "special object" we can create?

Share this post


Link to post
Share on other sites

I'm assuming so. But what is (in scripting terms) "#dynamicsound", i.e. is it something that we can create as a special kind of object similar to "#lightpoint"? I tested with normal "sound objects", but these does not show up that way.

I.e. I just made this code snippet to make sound effects to island objects (could be easily expanded to include dynamically placed objects):

Player script:

[] spawn {
private ["_pos","_doexit"];
_tcounter = 0;
d_soundobjects = [
	["Land_Misc_Well_L_EP1","fx_well"],
	["Land_Misc_Well_C_EP1","fx_well"],
	["M1130_HQ_unfolded_Base_EP1","fx_humming",[0,3.8,1]]
];
d_tmparray = [];
for "_i" from 0 to count d_soundobjects - 1 do {
	d_tmparray set [count d_tmparray, (d_soundobjects select _i) select 0];
};
d_array = nearestObjects [d_island_center, d_tmparray, 9200]; //Ouch!
for "_i" from 0 to count d_array - 1 do {
	for "_j" from 0 to count d_soundobjects - 1 do {
		_doexit = false;
		if (typeOf (d_array select _i) == (d_soundobjects select _j) select 0) then {
			_pos = [];
			if (count (d_soundobjects select _j) > 2) then {
				_pos = (d_array select _i) modelToWorld ((d_soundobjects select _j) select 2);
			} else {
				_pos = getPos (d_array select _i);
			};
//				_obj = "Sign_sphere100cm_EP1" createVehicle _pos;
//				_obj setPos _pos;
			_trigger = createTrigger ["EmptyDetector", _pos];
			_trigger setTriggerStatements ["true", "", ""];
			_trigger setSoundEffect ["NoSound", "", "", (d_soundobjects select _j) select 1];
			_trigger setTriggerText ((d_soundobjects select _j) select 1);
			_doexit = true;
		};
		if (_doexit) exitWith {
			_tcounter = _tcounter + 1;
//				hintSilent format ["%1 trigger created at %2", (d_soundobjects select _j) select 0, mapGridPosition _pos];
		};
		sleep 0.03;
	};
};
_soundobjects = nil;
_array = nil;
//	hintSilent format ["Total of %1 sound triggers created, based on %2 found objects", _tcounter, count d_array];
};

That creates a new cfg_SFX effect called fx_well to 125 wells across Takistan, and a fx_humming at the cabinet of an unfolded Stryker HQ. Script is still "in the works" so contains some "deliberate errors" yet (stuff that isn't used, global parameters etc), even if it works as is (d_island_center defined elsewhere, but original Domination code was moved to i_common so that clients can use it too).

For ref, the description.ext, relevant parts.

CfgSounds:

class NoSound {name = "NoSound";sound[] = {"", 0, 1};titles[] = {};}; //Dummy sound needed for setSoundEffect command.

CfgSFX:

class fx_well {name = "fx_well";sounds[]={sound1};sound1[]={"sounds\fx_well.ogg",1,1,50,1,0,0,0};empty[]= {"",0,0,0,0,0,0,0};};

class fx_humming {name = "fx_humming";sounds[]={sound1};sound1[]={"sounds\fx_humming.ogg",1,1,50,1,0,0,0};empty[]= {"",0,0,0,0,0,0,0};};

But a big issue for me is that attachTo doesn't work for all kinds of objects (the object a trigger is being attached to). Now what about this mystery "#dynamicsoundsource"? Does it have any special properties we don't know about?

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×