petteerr 0 Posted June 4, 2009 [["USMC"], BIS_ACM] call BIS_ACM_setFactionsFunc; I have tried just this but spawn blufor and opfor as weell :((bmp2green,and mi8red)in a test! One rifleman with nothing around whats wrong?? Share this post Link to post Share on other sites
MiXeR 10 Posted June 4, 2009 How to spawn only infantry? Share this post Link to post Share on other sites
trini scourge 1 Posted June 4, 2009 Alright, I'm getting it. But is that spawn distance the distance the units will spawn from me or from the ACM gamelogic? I guess that's what's confusing me. It seems a little silly to have stuff spawning 1 to 10m away from the player. Plus when playing the missions and campaign I never saw anything that close to me. The default values are much higher. [bIS_ACM, 1, 10] is an example that schaefsky used for testing purposes. [MY_ACM, 500, 800] would be much more appropriate. As far as I can tell, since the Module is synchronized to a group/unit, spawns occur in the specified vicinity of the synchronized group/unit, and not the location of the logic itself. If that still confuses you, you can always use the name of a synchronized unit instead of the logic as the reference object. Example: [player, 500, 800] Share this post Link to post Share on other sites
manzilla 1 Posted June 4, 2009 The default values are much higher. [bIS_ACM, 1, 10] is an example that schaefsky used for testing purposes. [MY_ACM, 500, 800] would be much more appropriate. As far as I can tell, since the Module is synchronized to a group/unit, spawns occur in the specified vicinity of the synchronized group/unit, and not the location of the logic itself. If that still confuses you, you can always use the name of a synchronized unit instead of the logic as the reference object. Example: [player, 500, 800] Hey thanks a lot trini. I completely understand it now. I was thinking 1/10 were the absolute min/max. Your settings are more what I wanted. It took me a while but you've explained it very well. Thanks. Jesus I finally figured what something like this means after all this time. //Pick from: USMC, CDF, RU, INS, GUE.[<factions | Array of Strings>, <ACM reference | Object>] call BIS_ACM_setFactionsFunc; Yes just enter the Array of strings here: <factions | Array of Strings> so ["USMC", "CDF", "RU"] then this <ACM reference | Object> you put BIS_ACM- (which in this case is simply referencing the ACM Module itself. Not really sure in what instance you'd use an object or what "ACM reference" really means in this case.)So it should look like this in the end if you want to have combat between US and CDF vs. RU: [["USMC", "CDF", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc; Hopefully this is correct Share this post Link to post Share on other sites
trini scourge 1 Posted June 4, 2009 (edited) For those that still need help with getting it to work, copy and paste this into your mission's "init.sqf", and change whatever you need to. waitUntil {!isNil {BIS_ACM getVariable "initDone"}}; waitUntil {BIS_ACM getVariable "initDone"}; //Sets frequency and number of patrols (0-1). BIS_ACM is module name [1, BIS_ACM] call BIS_ACM_setIntensityFunc; //min max spawn distance [bIS_ACM, 300, 600] call BIS_ACM_setSpawnDistanceFunc; //factions to be spawned [["USMC", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc; //Skill range for spawned units [0, 0.6, BIS_ACM] call BIS_ACM_setSkillFunc; //Amount of ammo spawned units possess [0.2, 0.5, BIS_ACM] call BIS_ACM_setAmmoFunc; //Type of patrol. With 0 meaning no chance of appearing, and 1 meaning 100% chance. -1 removes patrol type completely. ["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc; ["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc; Edited June 4, 2009 by trini scourge 1 Share this post Link to post Share on other sites
manzilla 1 Posted June 4, 2009 Beautiful. Thanks a lot trini. Share this post Link to post Share on other sites
petteerr 0 Posted June 4, 2009 Trini_scourge, If we want to use support for 2 fanctions with different intensity values..etc? Share this post Link to post Share on other sites
akm74 1 Posted June 4, 2009 Thanks for example trini Can we actually use "this synchronizeObjectsAdd allUnits" instead of F5 ? Share this post Link to post Share on other sites
DnA 5143 Posted June 4, 2009 Can we actually use "this synchronizeObjectsAdd allUnits" instead of F5 ? Yes, but be quick, because you only have 0.5 seconds to synchronize this way ... after that the ACM will evaluate which group is synced to it. Thanks for the assistance trini ;) Share this post Link to post Share on other sites
trini scourge 1 Posted June 4, 2009 Trini_scourge,If we want to use support for 2 fanctions with different intensity values..etc? Sorry petteerr, I have no idea. We will have to wait for DNA to answer that question. Thanks for the assistance trini ;) No problem :cool: Share this post Link to post Share on other sites
st!gar 3 Posted June 4, 2009 (edited) Manzilla wrote: [["USMC", "CDF", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc; Hopefully this is correct But then petteerr wrote: [["USMC"], BIS_ACM] call BIS_ACM_setFactionsFunc;I have tried just this but spawn blufor and opfor as weell (bmp2green,and mi8red)in a test! One rifleman with nothing around whats wrong?? ...So then what Manzilla posted wasn't correct, after all, or...? :confused: Edited June 4, 2009 by St!gar Share this post Link to post Share on other sites
trini scourge 1 Posted June 4, 2009 (edited) ...So then what Manzilla posted wasn't correct, after all, or...? :confused: They are both correct, but afaik cannot be used in the INIT field (which is what I assume peterr is referring to). For those that still need help with getting it to work, copy and paste this into your mission's "init.sqf", and change whatever you need to. waitUntil {!isNil {BIS_ACM getVariable "initDone"}}; waitUntil {BIS_ACM getVariable "initDone"}; //Sets frequency and number of patrols (0-1). BIS_ACM is module name [1, BIS_ACM] call BIS_ACM_setIntensityFunc; //min max spawn distance [bIS_ACM, 300, 600] call BIS_ACM_setSpawnDistanceFunc; //factions to be spawned [b][color="Red"][["USMC", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc;[/color][/b] //Skill range for spawned units [0, 0.6, BIS_ACM] call BIS_ACM_setSkillFunc; //Amount of ammo spawned units possess [0.2, 0.5, BIS_ACM] call BIS_ACM_setAmmoFunc; //Type of patrol. With 0 meaning no chance of appearing, and 1 meaning 100% chance. -1 removes patrol type completely. ["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc; ["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc; As you can see it is used as part of a broader script (in this case, init.sqf), so using the command on it's own will probably do nothing. Edited June 4, 2009 by trini scourge Share this post Link to post Share on other sites
st!gar 3 Posted June 4, 2009 Uh-huh... :raisebrow: But then, if you want to use the actual GL itself rather than having to go through making a whole init.sqf file about it, you must write something else? Share this post Link to post Share on other sites
manzilla 1 Posted June 4, 2009 Uh-huh... :raisebrow:But then, if you want to use the actual GL itself rather than having to go through making a whole init.sqf file about it, you must write something else? I think you can just put [["USMC", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc; in to the init line of the ACM GL. Share this post Link to post Share on other sites
trini scourge 1 Posted June 4, 2009 St!gar, the script is useful for those who want more control over the module. If copy and pasting the code is too much work for you, then you are probably just going to have to do it the easier way (by just syncing the module). OR just do these 5 easy steps: 1.) New mission, in the mission create the player/group 2.) Place Combat Module, name it BIS_ACM (for the sake of simplicity) 3.) Save Mission 4.) Go to- My Documents/Arma2/missions, open your mission folder 5.) Create ordinary txt file, paste code supplied earlier, Save As "init.sqf" Play. 5 mins and 5 easy steps == almost total control of the module. I put comments above every line of code explaining what each does. Just change the values to suit your needs. If this is too much, then you may have to wait for DNA's example missions and instructions. Share this post Link to post Share on other sites
st!gar 3 Posted June 5, 2009 (edited) St!gar, the script is useful for those who want more control over the module. Well, I don't really feel like I need lots and lots of control over everything it does. That's kind of the whole point. But the few, incredibly basic things I want to be able to control, I want to be able to do on the spot. Things like which factions and where they spawn. Maybe - maybe at times the density level. But that's all. If I have some very specific ideas and needs lots of control over what's going on, I'd probably not use the ACM in the first place. I just want to be able to dump it into the editor, tinker with the values and press "Preview". Not be dependant on copying an init.sqf into the mission folder every time I want to use it in a mission. That's pretty much where I stand. It's not like I'm in any way opposed to doing it your way, I had just hoped it would be a simpler, more user-friendly way to do it. :) If I hadn't known about this forum, for example, I would be pretty much boned. I can imagine myself randomly trying the ACM in the Editor, realising that it's cool, but also that I don't want every battle to be a batshit insane chaos; spawning absolutely every faction at once in a giant, largely unrealistic six-way mêlée, the way the ACM supposedly works un-edited. So I'd try to modify the GL on the spot, but seeing as I'd have no idea how to do it, I wouldn't ever in practice actually find any use for the ACM. And that would be too bad. Edited June 5, 2009 by St!gar Share this post Link to post Share on other sites
CarlGustaffa 4 Posted June 5, 2009 But the few, incredibly basic things I want to be able to control, I want to be able to do on the spot. You can, those things are set in the editor. ACM is not an "incredibly basic thing". You could possibly do a code spawn directly from the editor instead of from the init.sqf, but that would look much more ugly and hard to edit. You simply can't do advanced stuff like ACM, while being reluctant to learn about it. Also, if you don't want to set values now, believe me later you want to set more than it supports. The rest of us want's this. Share this post Link to post Share on other sites
Akilez 10 Posted June 5, 2009 I agree completely that by having low level scripting control over modules and other aspects one has far more flexibilty in mission creation. However, these aspects must be fully documented or you relegate complex mission creation to a very small population. Engineering Mantra: "The job isn't finished until the paperwork is complete." Akilez Share this post Link to post Share on other sites
-)rStrangelove 0 Posted June 5, 2009 Imo you don't need to use predefined BIS scripts like the ACM for 'complex mission creation'. The editor can help you making good missions without using scripts at all, but... Like with every other TOOL you need to LEARN in order to get basic UNDERSTANDING how to use it. Don't rely on the ACM or any other script to make a mission for you. And you (still) need a good idea for a good mission. A TOOL DOESN'T MAKE YOU CREATIVE. :) Share this post Link to post Share on other sites
charliereddog 9 Posted June 5, 2009 I don't think I've ever created a "proper" mission (not me vs the whole world messabout in the editor:)) without having an init file of some sort. Could you not nest the required commands in an init field somewhere in the editor? It'd be a right mess, but I think it would work. (Ah, I think that's what Carl's saying.) Share this post Link to post Share on other sites
Alex72 1 Posted June 5, 2009 Amazing! This is exactlly what i wanted. :) And for anyone who thinks its annoying to copy an INIT.SQF to the mission folder...? Cmon. Do you know what we had to do before this? Just have a copy of this INIT.SQF in the "scripts" folder inside the profiles folder. That way you can just copy it into whatever missions your working on and change the variables. To be honest it isnt much variables to change. Just wich sides should be needed to change - maybe - and distances should be most often the same so no need to change that. you can even make 3 different init's with different ranges/sides so just pick the one you need. All you need to do then is to move 1 file to your mission folder. Not really hard is it. Really great work BIS. Alex Share this post Link to post Share on other sites
-)rStrangelove 0 Posted June 5, 2009 You can write single commands into init fields, it's the same as putting them into a script. Problem is you can't do wicked stuff like loops. Well ok apart from the 'forEach' command , which is kind of a loop too. Init fields are what they name suggests: you can manipulate variables on the unit/object when it's initialized, but that's all. Typically you would only do that when you can't edit a variable through the object dialog directly or you want to easy workload by passing command to a whole group of units ("commands _X" foreach units group this) etc etc. Init fields are NOT like scripts. Share this post Link to post Share on other sites
st!gar 3 Posted June 5, 2009 I agree completely that by having low level scripting control over modules and other aspects one has far more flexibilty in mission creation.However, these aspects must be fully documented or you relegate complex mission creation to a very small population. I think that was kind of the point I was going for... Init fields are what they name suggests: you can manipulate variables on the unit/object when it's initialized, but that's all. Typically you would only do that when you can't edit a variable through the object dialog directly or you want to easy workload by passing command to a whole group of units ("commands _X" foreach units group this) etc etc.Init fields are NOT like scripts. Aah... Share this post Link to post Share on other sites
CarlGustaffa 4 Posted June 5, 2009 Init fields are NOT like scripts. Actually, if you spawn someting in there, I think you can do pretty much anything. It won't look pretty though :) I know in Arma1 I did basic ifs, labelling, and loops within an init field if I started the whole mess using spawn. But due to sheer uglyness, I wouldn't reccomend it :D As for documentation, I think the devs already said they're working on it. High level (easy to use interface) is not there, and I don't think it will be. Takes too long to develop, and forces are spent fixing things. And frankly, I don't think the engine supports it for the 2D editor. Share this post Link to post Share on other sites
petteerr 0 Posted June 5, 2009 so saying... did anybody managed to use support for two fanctions with different values?? anyone...?? I tried this with two acm modules(one init sqf) waitUntil {!isNil {BIS_ACM getVariable "initDone"}}; waitUntil {BIS_ACM getVariable "initDone"}; //Sets frequency and number of patrols (0-1). BIS_ACM is module name [1, BIS_ACM] call BIS_ACM_setIntensityFunc; //min max spawn distance [bIS_ACM, 40, 80] call BIS_ACM_setSpawnDistanceFunc; //factions to be spawned [["USMC"], BIS_ACM] call BIS_ACM_setFactionsFunc; //Skill range for spawned units [0, 0.6, BIS_ACM] call BIS_ACM_setSkillFunc; //Amount of ammo spawned units possess [0.2, 0.5, BIS_ACM] call BIS_ACM_setAmmoFunc; //Type of patrol. With 0 meaning no chance of appearing, and 1 meaning 100% chance. -1 removes patrol type completely. ["ground_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc; ["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc; waitUntil {!isNil {BISS_ACM getVariable "initDone"}}; waitUntil {BISS_ACM getVariable "initDone"}; //Sets frequency and number of patrols (0-1). BISS_ACM is module name [1, BISS_ACM] call BISS_ACM_setIntensityFunc; //min max spawn distance [bISS_ACM, 40, 80] call BISS_ACM_setSpawnDistanceFunc; //factions to be spawned [["RU"], BISS_ACM] call BISS_ACM_setFactionsFunc; //Skill range for spawned units [0, 0.6, BISS_ACM] call BISS_ACM_setSkillFunc; //Amount of ammo spawned units possess [0.2, 0.5, BISS_ACM] call BISS_ACM_setAmmoFunc; //Type of patrol. With 0 meaning no chance of appearing, and 1 meaning 100% chance. -1 removes patrol type completely. ["ground_patrol", 1, BISS_ACM] call BISS_ACM_setTypeChanceFunc; ["air_patrol", 0, BISS_ACM] call BISS_ACM_setTypeChanceFunc; but it didnt worked. Share this post Link to post Share on other sites