maihym 12 Posted June 25, 2016 So I want to try to enable simulation for certain objects in the map. Instead of just going to each item and checking "EnableSimulation", what script or trigger can I put in to automatically enable simulation on certain objects? Share this post Link to post Share on other sites
Gazzamc 1 Posted June 25, 2016 You could add them to an array and then use Foreach loop to enableSimulation on each object. objArr = ["obj1","obj2","obj3"]; {_X enableSimulation true;} forEach objArr; Share this post Link to post Share on other sites
Chewz 23 Posted June 25, 2016 You could add them to an array and then use Foreach loop to enableSimulation on each object. objArr = ["obj1","obj2","obj3"]; {_X enableSimulation true;} forEach objArr; This will only work if you use an array of objects instead of strings; An object is defined in a similar way as a variable so it doesn't need to be in a string etc, a good example of a object is the player, similarly, an object can be defined by entering a name to an object. Gazzamc gave a good example initially, except for the use of strings, instead, all you ned to change is the objArr from objArr = ["obj1","obj2","obj3"]; to objArr = [Object_1, Object_2, Object_3]; You can find out more information about objects here Hope this helps. 2 Share this post Link to post Share on other sites
maihym 12 Posted June 26, 2016 This will only work if you use an array of objects instead of strings; An object is defined in a similar way as a variable so it doesn't need to be in a string etc, a good example of a object is the player, similarly, an object can be defined by entering a name to an object. Gazzamc gave a good example initially, except for the use of strings, instead, all you ned to change is the objArr from objArr = ["obj1","obj2","obj3"]; to objArr = [Object_1, Object_2, Object_3]; You can find out more information about objects here Hope this helps. Oh okay, thank you guys. But how should I execute these? Share this post Link to post Share on other sites
MKD3 27 Posted June 26, 2016 But how should I execute these? In init.sqf or a trigger Share this post Link to post Share on other sites
Gazzamc 1 Posted June 27, 2016 Thanks for clearing that up, That's what i meant, It was a pretty late night when i replied to this thread. This will only work if you use an array of objects instead of strings; An object is defined in a similar way as a variable so it doesn't need to be in a string etc, a good example of a object is the player, similarly, an object can be defined by entering a name to an object. Gazzamc gave a good example initially, except for the use of strings, instead, all you ned to change is the objArr from objArr = ["obj1","obj2","obj3"]; to objArr = [Object_1, Object_2, Object_3]; You can find out more information about objects here Hope this helps. 1 Share this post Link to post Share on other sites
terox 316 Posted June 28, 2016 enablesimulation afaik is on by default, you only need to "opt" out of the simulation, eg < object > enablesimulation false Share this post Link to post Share on other sites
R3vo 2654 Posted June 28, 2016 Just select all the object you want to disable the simulation for and make a mass change of the attribute. Share this post Link to post Share on other sites
terox 316 Posted June 29, 2016 According to the OP, he wants to Enable not disable Share this post Link to post Share on other sites
terox 316 Posted June 29, 2016 So I want to try to enable simulation for certain objects in the map. Instead of just going to each item and checking "EnableSimulation", what script or trigger can I put in to automatically enable simulation on certain objects? Just select all the object you want to disable the simulation for and make a mass change of the attribute. Share this post Link to post Share on other sites
maihym 12 Posted June 29, 2016 Ok sorry I didn't close this thread earlier but all I did was open up that little menu on the left side of eden with all the objects you placed. Turns out if you search for your object, they all come up neatly. I just shift clicked all of them and then right-clicked and selected attributes and then just enabled simulation like that. It was super easy. 2 Share this post Link to post Share on other sites