Valfunction 1 Posted September 16, 2013 (edited) I have somewhat completed work on a garrisoning script for A3. Just a quick way to spawn dudes in buildings (outside of the military ones the sites module already does). However at present it is a little cumbersome to implement. You put down markers, input their names into an array in the script and then the script finds the nearest building for each marker and populates it based on some parameters you give it. I was wondering if/how it is possible to implement it into a module that is selectable under the modules tab? That way you can plop down a module and synchronise it to the buildings you want and voila. Is there a tutorial for making modules? I tried google and I get a lot of hits for how to use modules but not so much for creating them. EDIT: I was initially going to do it via radius and then it selects a certain percentage of the buildings within that radius (so you don't populate every building in a 100m radius in Kavala as it would spawn several hundred AI), but if there is a way to sync it to specific buildings it would be nice. Edited September 16, 2013 by Valfunction Share this post Link to post Share on other sites
Larrow 2821 Posted September 16, 2013 There is some info in the WIKI about the new Arma 3 Module Framework 2 Share this post Link to post Share on other sites
Tajin 349 Posted September 16, 2013 The problem with modules is that afaik, they can only be included in addons. So it's not really the best option for a mission author. Share this post Link to post Share on other sites
Polygon 11 Posted September 16, 2013 You can always pack your mission as an addon, but will it work with Steam workshop? AFAIR it automatically puts mission files in A3's /mission folder only. Share this post Link to post Share on other sites
mr_centipede 31 Posted September 16, 2013 It's small enough it should be fine I think. It makes mission making easier. As for the end user that's not making mission, I think it's small enough so it should be fine. Share this post Link to post Share on other sites
Tajin 349 Posted September 16, 2013 Its not really about the size of the addon, its that addons are not downloaded automatically... only missions are. Would be a different thing if it was part of one big community-addon with several useful modules but not everyone likes to install some tiny addon just for a single mission that "maybe" isn't even used anywhere else. Creating it as a script will make it more accessible for missionmakers and players alike. Share this post Link to post Share on other sites
Polygon 11 Posted September 16, 2013 Would be a different thing if it was part of one big community-addon with several useful modules but not everyone likes to install some tiny addon just for a single mission that "maybe" isn't even used anywhere else. Wolffy.au had a project for enhancing functionality of default BIS modules for A2CO. Not sure it will make its way into A3 though. Seeing as MSO will definitely be released soon, there's a chance. Share this post Link to post Share on other sites
Valfunction 1 Posted September 24, 2013 Sorry guys for not getting back to this page (actually forgot about this - been away for a bit). I ended up going with it as a script. The info on module creation was very useful and I will file it away for future use, but for now I'm keeping my one as a script. Just wondering, is there any way to synchronise something to a building - using F5 doesn't work? Share this post Link to post Share on other sites
Pac Man 10 Posted September 24, 2013 Val, in what way are you using nearestBuilding? When I use: this setPos ((nearestBuilding this) buildingPos 1) The game freezes. There are several tickets on the feedback tracker about it aswell. Apparently it only happens on Altis though. Which map are you using to test your script? Share this post Link to post Share on other sites
Larrow 2821 Posted September 24, 2013 Just wondering, is there any way to synchronise something to a building - using F5 doesn't work? Place a gameLogic as close to the building ID number as you can then run something like the below in the gameLogic's init. build = (getpos this) nearestObject "House"; player synchronizeObjectsAdd [build] This will sync the building to the player. Share this post Link to post Share on other sites
Valfunction 1 Posted September 26, 2013 @Larrow Cheers mate will try it out @Pac Man I've only tested it on Stratis so far. Will have to try it on Altis and see what happens. My script is a variation of what you have tried. It is run out of an sqf rather than the init field. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted September 26, 2013 (edited) Isn't there a way of including an addon in your mission using cfgFunctions? I defer to the post here that discusses in more detail. Edited September 27, 2013 by KevsnoTrev speeling 1 Share this post Link to post Share on other sites