Cougs 10 Posted August 5, 2010 Can it be done? There are posts and examples on house animations and chimney effects for A2 but what about Takistan and other building in Arrowhead? There are streetlights and runway lights but the entire town is pitch black at night which is not realistic at all. If you can't turn on house lights then is there a way to create a light source and POS it or ATTACH it to a building? Share this post Link to post Share on other sites
AAD10 Pete 10 Posted August 5, 2010 Lightning and shadowing are two bigger problems of the Arma2 engine because of its limitation in these parts... I think it could be done but first BIS had to improve their engine Share this post Link to post Share on other sites
Big Dawg KS 5 Posted August 5, 2010 is there a way to create a light source and POS it or ATTACH it to a building? Yea, pretty much exactly as you described: _light = "#lightpoint" createVehicleLocal _pos; _light setLightColor [1,1,1]; _light setLightAmbient [0.6,0.6,0.6]; _light setLightBrightness 0.5; Share this post Link to post Share on other sites
Cougs 10 Posted August 5, 2010 Thx - I got the pos of a marker, put the light source on the marker, then raised it by a height of 2.2 mtrs which is about the height of the average roof. I'm sure there is a better way to do this with arrays and loops. _light1 = "#lightpoint" createVehicleLocal (getMarkerPos "houselight1"); _light1 setpos[(getmarkerpos "houselight1" select 0), (getmarkerpos "houselight1" select 1),((getmarkerpos "houselight1" select 2) + 2.2)]; _light1 setLightColor [1,1,1]; _light1 setLightAmbient [1,0.5,1]; _light1 setLightBrightness 0.006; _light2 = "#lightpoint" createVehicleLocal (getMarkerPos "houselight2"); _light2 setpos[(getmarkerpos "houselight2" select 0), (getmarkerpos "houselight2" select 1),((getmarkerpos "houselight2" select 2) + 2.2)]; _light2 setLightColor [1,1,1]; _light2 setLightAmbient [1,0.5,1]; _light2 setLightBrightness 0.006; _light3 = "#lightpoint" createVehicleLocal (getMarkerPos "houselight3"); _light3 setpos[(getmarkerpos "houselight3" select 0), (getmarkerpos "houselight3" select 1),((getmarkerpos "houselight3" select 2) + 2.2)]; _light3 setLightColor [1,1,1]; _light3 setLightAmbient [1,0.5,1]; _light3 setLightBrightness 0.006; Share this post Link to post Share on other sites
CarlGustaffa 3 Posted August 5, 2010 I'm using the following method to place sounds. I'm sure you can expand/change it to place lights into the world. [] 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]; //It's a stretch wrt performance, I know. 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); }; if (d_debug_mode) then {_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; _d_tmparray = nil; _d_array = nil; }; Share this post Link to post Share on other sites
Cougs 10 Posted August 5, 2010 Thanks guys - I got it to work. I'll refine what I have and post here because this seems to be largely undocumented in Arrowhead. Share this post Link to post Share on other sites
Relicc2 10 Posted August 22, 2010 I'm really new to this, so I don't understand where you guys are sticking this code. Share this post Link to post Share on other sites
CarlGustaffa 3 Posted August 22, 2010 You can create a file called init.sqf within your mission folder and paste the code there. The first examples only needs some markers defined. Mine needs some additional stuff done in a file called description.ext (which you also need to create), that deals with sound stuff (kinda cryptic if you don't know it), so probably not the best place to start. Be sure to lookup http://community.bistudio.com/wiki/Main_Page and the sticky at the top of this forum. Share this post Link to post Share on other sites