Vegatry 10 Posted March 2, 2014 (edited) Intention: The purpose was I want the AI used for creating an ambient basement hidden when a checking trigger is activated to increas frame rates. (I want to save them for later use which deleteVehicle is not an option) May anyone help me debug it a bit, or any ideas to reproduce the script? (Example mission would be the best) Many thanks. Update: The error is known caused by the false usage of switch-case. The following script is my first attempts, which is pretty shitty and unshaped. As I expected, it failed to work :butbut: Its activated via trigger's onAct on Act = nul = ["dum1"] execVM "AIcache.sqf"; AIcache.sqf: _dummygroup1 = [dummy1, dummy2,dummy3,dummy4,dummy5,dummy6,dummy7,dummy8,dummy9,dummy10,dummy11,dummy12,dummy13,dummy14,dummy15,dummy16,dummy17,dummy18,dummy19,dummy20,dummy21,dummy22,dummy23,dummy24,dummy25,dummy26,dummy27,dummy28,dummy29]; _dummygroup2 = [dummy30,dummy31,dummy32,dummy34]; _typeOfDummy = toLower (_this select 0); switch(_typeOfDummy) do { case "dum1" { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup1; }; case "dum2" { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup2; }; } Edited March 3, 2014 by Vegatry Share this post Link to post Share on other sites
iconoclastdx 5 Posted March 3, 2014 forEach unit _dummygroup1; maybe? Share this post Link to post Share on other sites
nimrod_z 8 Posted March 3, 2014 Intention:The purpose was I want the AI used for creating an ambient basement hidden when a checking trigger is activated to increas frame rates. (I want to save them for later use which deleteVehicle is not an option) May anyone help me debug it a bit, or any ideas to reproduce the script? (Example mission would be the best) Many thanks. Update: The error is known caused by the false usage of switch-case. The following script is my first attempts, which is pretty shitty and unshaped. As I expected, it failed to work :butbut: Its activated via trigger's onAct on Act = nul = ["dum1"] execVM "AIcache.sqf"; AIcache.sqf: _dummygroup1 = [dummy1, dummy2,dummy3,dummy4,dummy5,dummy6,dummy7,dummy8,dummy9,dummy10,dummy11,dummy12,dummy13,dummy14,dummy15,dummy16,dummy17,dummy18,dummy19,dummy20,dummy21,dummy22,dummy23,dummy24,dummy25,dummy26,dummy27,dummy28,dummy29]; _dummygroup2 = [dummy30,dummy31,dummy32,dummy34]; _typeOfDummy = toLower (_this select 0); switch(_typeOfDummy) do { case "dum1" { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup1; }; case "dum2" { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup2; }; } your error with switch is they are all missing : example case "dum1" : { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup1; }; Share this post Link to post Share on other sites
Vegatry 10 Posted March 3, 2014 your error with switch is they are all missing :example case "dum1" : { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup1; }; :o Cheers mate, just notice what a foolish errors I had made. Share this post Link to post Share on other sites