Jump to content

Recommended Posts

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

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

 

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.

  • Like 2

Share this post


Link to post
Share on other sites

 

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

 

 

 But how should I execute these?

In init.sqf or a trigger

Share this post


Link to post
Share on other sites

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.

 

  • Like 1

Share this post


Link to post
Share on other sites

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

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

According to the OP, he wants to Enable not disable

Share this post


Link to post
Share on other sites

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

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.

  • Like 2

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

×