Jump to content
Mr H.

[NOT SOLVED again...] Script creation/activation of CAS module no longer working

Recommended Posts

So: I used to create the CAS module like this:
 

_center = createCenter sideLogic;    
_group = createGroup _center;    
_pos = _requestedPosFormated;     
_cas = _group createUnit ["ModuleCAS_F",_pos , [], 0, ""];
_cas setDir random [0,180,360];   
_cas setVariable ["vehicle",_vehicle,true]; 
_cas setVariable ["type", _typeOfAttack,true];

This used to work up until recent Arma updates, but now it doesn't anymore. Has someone else encountered the issue ? Found a fix?

Share this post


Link to post
Share on other sites
_cas setVariable [ "bis_fnc_initModules_disableAutoActivation", false, !isServer ];

 

  • Like 2
  • Thanks 3

Share this post


Link to post
Share on other sites

And... of course your fix works @Larrow I can't even gess where you get all this arma wisdom 😉 You truly are the master Yoda around here!

  • Like 2

Share this post


Link to post
Share on other sites

They changed some of the initialisation code for modules in A3 1.88. If the module needs to initialise on the server then you have to set this flag to false. Otherwise the module will just sit there waiting.

So either the above (when done exactly as you spawn the module) or...

_cas setVariable [ "bis_fnc_initModules_activate", true, !isServer ];

at sometime after module creation.

  • Like 3

Share this post


Link to post
Share on other sites

Side question: I've also had issues with some custom eden attributes on a custom object. Changing attributes would add ACE3 interactions to the object. This used to work fine but since the last update they do not show when on a dedi (but still do when testing on local machine) do you see anything in recent changes that could explain it ?

EDIT: issue was caused by some changes in ACE3

Share this post


Link to post
Share on other sites

Hey guys, ran into same problem, been looking for a new script everywhere. You said this works now, but I can't seem to spawn an object. Get an error message "No object, expected object" on setDir. 

What am I doing wrong?

Share this post


Link to post
Share on other sites
_center = createCenter sideLogic;    
_group = createGroup _center;    
_pos = _requestedPosFormated;     
_cas = _group createUnit ["ModuleCAS_F",_pos , [], 0, ""];
_cas setDir random [0,180,360];   
_cas setVariable ["vehicle",_vehicle,true]; 
_cas setVariable ["type", _typeOfAttack,true];
_cas setVariable [ "bis_fnc_initModules_disableAutoActivation", false, !isServer ];

this seems to be broken again with the latest update, the CAS won't spawn. Does anyone know more about this ?

 

Share this post


Link to post
Share on other sites

Creating CAS by script isn't something ive done ( other than forcing an editor plane to bomb things)  but on a more general point - I assume you've checked that at each step in your script that the things you are doing are working. ie line by line checking if things have been created or variables set as indicated?  Has that not helped narrow it down to one line or another?

Share this post


Link to post
Share on other sites

Yes, the script was working fine until an earlier arma release. The release broke it and then Larrow gave me a solution that worked (see above). It worked fine for a while until the latest update broke it again. I haven't had time to experiment with fixes since I'm working  on something else right now but I "reopened" the thread in case someone had any kind of information 

Share this post


Link to post
Share on other sites

I've been running with this the whole time, even included it in a release I've done over the last couple of weeks. 

Share this post


Link to post
Share on other sites
On 9/1/2019 at 8:19 AM, Mr H. said:

this seems to be broken again with the latest update,

Works fine for me in vanilla. Remember it must be created on the server, unless the module is editable via a local curator.

BTW there is no need for createCenter in Arma3.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
21 minutes ago, Larrow said:

Remember it must be created on the server,

It worked when creating locally before. I'll change that and report back!

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

×