Jump to content
damsous

Dynamic simulation for Site module

Recommended Posts

Hello, its possible to use a simple line for activate the dynamic simulation on the AI spawned by the site module ?

Share this post


Link to post
Share on other sites

Place this in your site modules init box.

h = this spawn {
	if !( isServer ) exitWith {};
	params[ "_site" ];

	waitUntil{ !isNil { _site getVariable "processed" } && { _site getVariable "processed" } };

	{
		_x enableDynamicSimulation true;
	}forEach ( _site getVariable[ "garrison", [] ] );
};

It uses two variables that are available on a site

  • "processed" is set true once the site and its groups have been initialised
  • "garrison" is an array of all the groups spawned by the site

So the script passes the module into a spawned thread this, which then waits until the site has fully initialised ( "processed" is true ).

It then loops through all the sites groups ( "garrison" ) and enables dynamic simulation for each one.

  • Like 3

Share this post


Link to post
Share on other sites

Big thanks i will try this :)

Share this post


Link to post
Share on other sites

So im trying to setup the Dynamic simulation and i have click all he boxes but still no good... 

one question are the ai meant to spawn? 

Share this post


Link to post
Share on other sites
On 07/08/2017 at 7:52 AM, CoG Joel said:

So im trying to setup the Dynamic simulation and i have click all he boxes but still no good... 

one question are the ai meant to spawn? 

Uncheck the view distance boxe and put 25m for try...

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

×