Search the Community
Showing results for tags 'simple objects'.
Found 1 result
-
Turning all map objects into super simple objects in EDEN.
LSValmont posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
convertedObjects = []; { if (isNil {_x getVariable "preventSimple"}) then { private _interiorPositions = []; _interiorPositions = [_x] call BIS_fnc_buildingPositions; if (count _interiorPositions isEqualTo 0) then { if (lightIsOn _x != "ON" && lightIsOn _x != "AUTO") then { private _position = getPosWorld _x; private _vectorDirUp = [vectorDir _x, vectorUp _x]; private _model = getModelInfo _x select 1; deleteVehicle _x; private _simpleObj = createSimpleObject [_model, _position]; _simpleObj setVectorDirAndUp _vectorDirUp; convertedObjects = convertedObjects + [_x]; }; }; }; } forEach (( allMissionObjects "building" - allMissionObjects "StreetLamp" ) select { !isClass( configFile >> "CfgVehicles" >> typeOf _x >> "UserActions" ) && ( getArray( configFile >> "CfgVehicles" >> typeOf _x >> "ladders" ) isEqualTo [] ) }); // add this command to the object's init to prevent it from going simple: // this setVariable ["preventSimple", true]; // use this command to count how many objects were turned into simple objects by the script: // count convertedObjects; // for obvious reasons the script will not turn into simple objects the following objects: // 1) Objects that have interiors 2) Objects that emmit light 3) Objects that have user acctions such as ladders, gates, street barriers etc. The code above replaces all the mission objects (That are not units/vehicles, have no interiors and/or have no lights) with simple ones. I gain +10 FPS immediately after running that code in GLOBAL turning +2100 objects into simple objects on my reference mission. (The FPS increase will depend on how many objects you've added to your mission via EDEN editor). The reduction in stuttering is notorious. Combine this script with other optimization scripts such as view distance and you will get more additional frames than overclocking your CPU without all the dangers! 😉 Special thanks to @Larrow Question for the Arma Gurus: How can I save those results to the mission file so it is those same simple objects right from the start? (Without using such MP resource heavy script). Thanks- 20 replies
-
- 2
-
- objects
- simple objects
-
(and 2 more)
Tagged with: