Jump to content
Sign in to follow this  
gopherman

Whats wrong with this ACM setup!?

Recommended Posts

This is what I have in my init.sqf for two ACM's sync'd with players one and two (as part of a co-op)

//ACM
//////////////////////////////////////////////////////////////////


waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};


[1, BIS_ACM] call BIS_ACM_setIntensityFunc;  
[bIS_ACM, 5, 20] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK_INS"], BIS_ACM] call BIS_ACM_setFactionsFunc;
[0.1, 0.2, BIS_ACM] call BIS_ACM_setSkillFunc;
[0.8, 1, BIS_ACM] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
[bIS_ACM, ["TK_INS_Group", "TK_INS_Patrol", "TK_INS_ATTeam", "TK_INS_Technicals", "TK_INS_MotorizedGroup", "TK_INS_MotorizedPatrolBTR40"]] call BIS_ACM_addGroupClassesFunc;


[1, BIS_ACM_1] call BIS_ACM_setIntensityFunc;
[bIS_ACM_1, 90, 100] call BIS_ACM1_setSpawnDistanceFunc;
[["BIS_TK_INS"], BIS_ACM_1] call BIS_ACM_setFactionsFunc;
[0.1, 0.2, BIS_ACM_1] call BIS_ACM_setSkillFunc;
[0.8, 1, BIS_ACM_1]_ call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 0, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;
[bIS_ACM_1, ["TK_INS_Group", "TK_INS_Patrol", "TK_INS_Technicals", "TK_INS_MotorizedGroup"]] call BIS_ACM_addGroupClassesFunc;

The ranges are there for testing purposes with a setcaptive 1 unit for observation.

BIS_ACM_1 never works.

Share this post


Link to post
Share on other sites

So you got one ACM-Module and thats called "BIS_ACM" right?

You should name one BIS_ACM1 and the other BIS_ACM2.

Edited by Egosa-U

Share this post


Link to post
Share on other sites

Cheers Egosa, but thats what I have done, including in the code I've pasted...

Danke!

Share this post


Link to post
Share on other sites

BIS_ACM_1, 90, 100] call BIS_ACM1_setSpawnDistanceFunc;

take the 1 out after ACM in that line, your telling it to call BIS_ACM1 which doesnt exist, i dont think

Oh and IO dont think you can spawn at 5, 20...I think the minimum is 400!

Seriously doubt anyone is reading this thread anymore but just thought id help!

Edited by KillSh0t

Share this post


Link to post
Share on other sites

You can have them spawn right on top of you. BIS_ACM_1 does exist; thats the name of the second ACM module for the code to refer to.

Still does not bloody work. F%"&ing f*$£!

Share this post


Link to post
Share on other sites

Just ran it through squint and it immediately picked up the extra underscore after the square brackets in line 23. Not sure that's your problem but it would be sensible to get rid of it.

Share this post


Link to post
Share on other sites
You can have them spawn right on top of you. BIS_ACM_1 does exist; thats the name of the second ACM module for the code to refer to.

Still does not bloody work. F%"&ing f*$£!

BIS_ACM_! is the module name....

Im talking about BIS_ACM1 you have in that line...

look at the line again, first U call BIS_ACM_1 which is fine but then you tell it to call BIS_ACM1 which does not exist.

The 1st line calls the module, the second line, the line im talking about calls the script.

the 1 at the end of it is telling it to call for BIS_ACM1 which does not exist.

Whatever, after hours of testing I know this one works!

waitUntil {!isNil {BIS_ACM getVariable "initDone"}};

waitUntil {BIS_ACM getVariable "initDone"};

sleep 5;

[1.0, BIS_ACM] call BIS_ACM_setIntensityFunc;

[bIS_ACM, 200, 500] call BIS_ACM_setSpawnDistanceFunc;

[["BIS_TK", "BIS_TK_INS", "BIS_US", "BIS_UN"], BIS_ACM] call BIS_ACM_setFactionsFunc;

[0.2, 1, BIS_ACM] call BIS_ACM_setSkillFunc;

[0.8, 0.9, BIS_ACM] call BIS_ACM_setAmmoFunc;

["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

["air_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

Edited by KillSh0t

Share this post


Link to post
Share on other sites

Ahh right, sorry I did not realise you were pointing out an inconsistancy in my code there.

Should also say, I can get a single ACM to work, its when I try and put a second in, the second never seems to work unless I put it in without any tweaks in the init.sqf

As soon as I do that, it does not work.

EDIT:

Looking at the code (with changed names for ease)

[1.0, ACM1] call BIS_ACM_setIntensityFunc;

or

[1.0, ACM1] call AMC1_setIntensityFunc;

..?

Edited by gopherman

Share this post


Link to post
Share on other sites

gopherman,

In regards to naming, you can name the ACM Module anything you want, the function will stay the same, thus:

[BIS_ACM_1, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

[BIS_ACM_2, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

[BIS_ACM_3, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

And, whatever name you use for the module needs to match the name/s you use in the init file (or visa versa). If you name the ACM Module in the editor, ACM1, then 'it' would be:

[ACM1, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

Yes, in case you missed that, which I do not think you did, the module would have to be named to make a custom spawn setup.

EDIT:

Just to be completely clear, it is the same for all the lines...

[1.0, BIS_ACM_1] call BIS_ACM_setIntensityFunc;

etc.

Edited by CyOp

Share this post


Link to post
Share on other sites
gopherman,

In regards to naming, you can name the ACM Module anything you want, the function will stay the same, thus:

[BIS_ACM_1, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

[BIS_ACM_2, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

[BIS_ACM_3, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

And, whatever name you use for the module needs to match the name/s you use in the init file (or visa versa). If you name the ACM Module in the editor, ACM1, then 'it' would be:

[ACM1, 900, 1200] call BIS_ACM_setSpawnDistanceFunc;

Yes, in case you missed that, which I do not think you did, the module would have to be named to make a custom spawn setup.

EDIT:

Just to be completely clear, it is the same for all the lines...

[1.0, BIS_ACM_1] call BIS_ACM_setIntensityFunc;

etc.

what Cyop said!

Sorry I couldnt get it as clear as they did lol!

I'm learning as I go along and the ACM can add SO much to even a dead map.

anywhoz, hope this all helps!

Share this post


Link to post
Share on other sites

This one works great...

I put a Blufor and attached an ACM

Same with Opfor and Independent....wait about two minutes and viola....war at its finest!

waitUntil {!isNil {BIS_ACM getVariable "initDone"}};

waitUntil {BIS_ACM getVariable "initDone"};

sleep 4;

[1.0, BIS_ACM] call BIS_ACM_setIntensityFunc;

[bIS_ACM, 150, 500] call BIS_ACM_setSpawnDistanceFunc;

[["BIS_TK"], BIS_ACM] call BIS_ACM_setFactionsFunc;

[0.5, 1, BIS_ACM] call BIS_ACM_setSkillFunc;

[0.8, 0.9, BIS_ACM] call BIS_ACM_setAmmoFunc;

["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

["air_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

waitUntil {!isNil {BIS_ACM1 getVariable "initDone"}};

waitUntil {BIS_ACM1 getVariable "initDone"};

sleep 5;

[1.0, BIS_ACM1] call BIS_ACM_setIntensityFunc;

[bIS_ACM1, 150, 500] call BIS_ACM_setSpawnDistanceFunc;

[["BIS_US"], BIS_ACM1] call BIS_ACM_setFactionsFunc;

[0.5, 1, BIS_ACM1] call BIS_ACM_setSkillFunc;

[0.8, 0.9, BIS_ACM1] call BIS_ACM_setAmmoFunc;

["ground_patrol", 1, BIS_ACM1] call BIS_ACM_setTypeChanceFunc;

["air_patrol", 1, BIS_ACM1] call BIS_ACM_setTypeChanceFunc;

waitUntil {!isNil {BIS_ACM2 getVariable "initDone"}};

waitUntil {BIS_ACM2 getVariable "initDone"};

sleep 6;

[1.0, BIS_ACM2] call BIS_ACM_setIntensityFunc;

[bIS_ACM2, 150, 500] call BIS_ACM_setSpawnDistanceFunc;

[["BIS_TK_GUE"], BIS_ACM2] call BIS_ACM_setFactionsFunc;

[0.5, 1, BIS_ACM2] call BIS_ACM_setSkillFunc;

[0.8, 0.9, BIS_ACM2] call BIS_ACM_setAmmoFunc;

["ground_patrol", 1, BIS_ACM2] call BIS_ACM_setTypeChanceFunc;

["air_patrol", 1, BIS_ACM2] call BIS_ACM_setTypeChanceFunc;

Share this post


Link to post
Share on other sites

KillSh0t,

I am assuming you know that only one ACM can be synced to only one unit/group. With that in mind, the factions will not be spawned in the same area for combat. If one or more unit/group is not within that 500m radius of an opposing unit/group/faction, there will, for the most part be no war. Thus...

waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

sleep 5;

[1.0, BIS_ACM_1] call BIS_ACM_setIntensityFunc;
[bIS_ACM_1, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_1] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_1] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_1] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;

[1.0, BIS_ACM_2] call BIS_ACM_setIntensityFunc;
[bIS_ACM_2, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_2] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_2] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_2] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_2] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_2] call BIS_ACM_setTypeChanceFunc;
[1.0, BIS_ACM2] call BIS_ACM_setIntensityFunc;

[1.0, BIS_ACM_3] call BIS_ACM_setIntensityFunc;
[bIS_ACM_3, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_3] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_3] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_3] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_3] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_3] call BIS_ACM_setTypeChanceFunc;

... synced to 3 different unit/groups.

HINT: With multiple ACMs, it would prob be better to not have one of them named BIS_ACM. That way, for the sake of ease, you could use 'Find/Replace' for renaming/adding/subtracting ACMs in the init, and you would not have to worry about the function part of the script.

Share this post


Link to post
Share on other sites

I have it synched to 3 different units...

after two minutes all 3 factions spawn and the fight begins.

First ACM is named BIS_ACM

Then ACM1

Then ACM2

I was also playing around with spawning different groups...I.E

"US_sniperteam" "TK_sniperteam" etc....

Placed em about 50/100m out from each unit in some mountains around takistan...loads of fun as sniper teams just pop up randomly.

The only down side is that when one of the units the ACM is synched to dies the ACM eventualy cleans up and ends...

Is there a way of synching the ACM to a game logic/objext or something similar that wont die?

I have tried the game logic but it doesnt seem to work....maybe I might not be doing something right?

Share this post


Link to post
Share on other sites

Awesome, working fine now. Many many thanks for the assistance guys!.

Share this post


Link to post
Share on other sites
KillSh0t,

I am assuming you know that only one ACM can be synced to only one unit/group. With that in mind, the factions will not be spawned in the same area for combat. If one or more unit/group is not within that 500m radius of an opposing unit/group/faction, there will, for the most part be no war. Thus...

waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

sleep 5;

[1.0, BIS_ACM_1] call BIS_ACM_setIntensityFunc;
[bIS_ACM_1, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_1] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_1] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_1] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;

[1.0, BIS_ACM_2] call BIS_ACM_setIntensityFunc;
[bIS_ACM_2, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_2] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_2] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_2] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_2] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_2] call BIS_ACM_setTypeChanceFunc;
[color="Red"][s][1.0, BIS_ACM2] call BIS_ACM_setIntensityFunc;[/s][/color]

[1.0, BIS_ACM_3] call BIS_ACM_setIntensityFunc;
[bIS_ACM_3, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_3] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_3] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_3] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_3] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_3] call BIS_ACM_setTypeChanceFunc;

... synced to 3 different unit/groups.

HINT: With multiple ACMs, it would prob be better to not have one of them named BIS_ACM. That way, for the sake of ease, you could use 'Find/Replace' for renaming/adding/subtracting ACMs in the init, and you would not have to worry about the function part of the script.

In the above ACM script from a couple of posts above, there is an unnecessary line. (I am surprised no readers caught it.) It should be...

[code]waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

sleep 5;

[1.0, BIS_ACM_1] call BIS_ACM_setIntensityFunc;
[bIS_ACM_1, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_1] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_1] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_1] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_1] call BIS_ACM_setTypeChanceFunc;

[1.0, BIS_ACM_2] call BIS_ACM_setIntensityFunc;
[bIS_ACM_2, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_2] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_2] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_2] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_2] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_2] call BIS_ACM_setTypeChanceFunc;

[1.0, BIS_ACM_3] call BIS_ACM_setIntensityFunc;
[bIS_ACM_3, 150, 500] call BIS_ACM_setSpawnDistanceFunc;
[["BIS_TK", "BIS_US", "BIS_TK_GUE"], BIS_ACM_3] call BIS_ACM_setFactionsFunc;
[0.5, 1, BIS_ACM_3] call BIS_ACM_setSkillFunc;
[0.8, 0.9, BIS_ACM_3] call BIS_ACM_setAmmoFunc;
["ground_patrol", 1, BIS_ACM_3] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, BIS_ACM_3] call BIS_ACM_setTypeChanceFunc;

[/code]

Another good reason why it is useful to use find replace, instead of copy and past, or type editing. BTW, that line would not keep that ACM script from working.

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
Sign in to follow this  

×