MadMonk48 0 Posted August 31, 2020 I'm trying to construct a house to house battle scenario. But I can't figure out how to position enemies on the various floors. Can anyone point me to or offer some help? What's the appropriate scripting for different houses and floors? Share this post Link to post Share on other sites
gc8 970 Posted August 31, 2020 you can use https://community.bistudio.com/wiki/buildingPos to get house positions. But it doesn't tell which floor they are in, it just returns positions there's also probably existing scripts for this if you don't want to do it your self Share this post Link to post Share on other sites
johnnyboy 3742 Posted August 31, 2020 This script works great. You can spawn the units into a building, or have them move into positions in the building. Units will stand at window positions and face outwards. https://forums.bohemia.net/forums/topic/170936-release-infantry-occupy-house-script/ 1 Share this post Link to post Share on other sites
Gunter Severloh 3949 Posted August 31, 2020 Theres other garrison scripts too, from my AI Compilation list - (1st post pg.2) Garrison Scripts Garrison script A3 [bETA] SP/MP by zorilyahttp://www.armaholic.com/page.php?id=22522 This script will allow you to make a more lively urban environment where you have to check every window and door in every house, the Ai will patrol and garrison nearby buildings. Grimes' Building Occupation Script SP/MP by Grimes [3rd ID]http://www.armaholic.com/page.php?id=25268 This script provides the mission maker an extremely simple way to occupy a set of buildings within a radius with a random or fixed amount of AI. Random House Garrison Script [ALPHA] SP/MP by Desrathttp://www.armaholic.com/page.php?id=19353 This script counts all available positions in radius, and spawns the units for you. Shock's Building Garrison Function (SBGF) SP/MP by JShockhttp://www.armaholic.com/page.php?id=27535 Function allows a mission developer to garrison buildings in a town/city/village with a user defined percentage based on the overall building count. [TOG] Garrison Script SP/MP by bp.sushihttp://www.armaholic.com/page.php?id=26930 Building garrison script you can use to populate area by placing one group in editor. ================ Welcome to BI Forums MadMonk48! 2 Share this post Link to post Share on other sites
avibird 1 141 Posted August 31, 2020 Johnnyboy script is great as well as the other Garrison scripts however with most of those scripts units will always stay in the house and in the rooms they are positioned. If you want a more dynamic way of doing it with editor place groups a few commands and a some triggers. Very easy with the editor and a few commands in the units init. https://community.bistudio.com/wiki/doStop https://community.bistudio.com/wiki/disableAI And a few trigger to enable pathway and move once a particular unit is killed or a player reaches a certain location like a threshold of a door For example. 24 units in one group scattered throughout a small village in various buildings on different floors all connected and sharing information. The units will stay in position until a trigger is reached or the units with the dostop move see fit to move to a different position. What you get is a more dynamic village occupation. I usually set triggers by the doors thresholds once a player reaches the threshold a few units pathway will be enabled given units the ability to move throughout the house again. The entire group is given a guard waypoint on the group leader. If you're interested I will give you the actual snippet of code to use. When I design a mission I like to use various different AI approaches. I would use the above method that I just stated as well as one of the Garrison or Johnny Boy script in combination for a much more dynamic occupation of a village in my humble opinion. Just using a Garrison script the units will always stay in the room they are positioned and never leave the room or the house. Avibird 1 Share this post Link to post Share on other sites
avibird 1 141 Posted August 31, 2020 I forgot to mention I always put a few small groups just with guard waypoints or sentry guard waypoints unfortunately these units can only be on first floor due to the group formation limitations. Bohemia should have had a loose group formation that the group members will stay in editor placed positions until the action occurs. I can only hope with arma4 Share this post Link to post Share on other sites
Joe98 90 Posted August 31, 2020 Place a man on the map (you) Place a second man on the map, on a floor as you said. Make the second man "playable" Start the scenario and jump into the shoes of the second man. Make sure he is alive and healthy, that he is not stuck in a wall, not stuck in the floor and he is in exactly the correct position. If he is not, then make corrections. Now find other positions and repeat the process. You might finish with 10 positions. Name your 10 enemy soldiers, red01 through red10 Now we write a script if (random 100 < 50) then {deletevehicle red02}; /// to delete red02 at random if (random 100 < 50) then {deletevehicle red03}; /// to delete red03 at random if (random 100 < 50) then {deletevehicle red04}; /// to delete red04 at random if (random 100 < 50) then {deletevehicle red05}; /// to delete red05 at random if (random 100 < 50) then {deletevehicle red06}; /// to delete red06 at random if (random 100 < 50) then {deletevehicle red07}; /// to delete red07 at random if (random 100 < 50) then {deletevehicle red08}; /// to delete red08 at random if (random 100 < 50) then {deletevehicle red09}; /// to delete red09 at random if (random 100 < 50) then {deletevehicle red10}; /// to delete red10 at random At least one enemy must be on the map so we cannot delete red01. As a result, there will be any number of enemy from 1 to 10 and you will never know how many there are! Not only that, you might find 20 positions and each man starts at one of 2 positions at random. Find something tiny like a small stone. Place 10 of them on the map. Set each one so it will start at one of 2 positions at random. for example red01 might start by with "red01 setpos getpos stone01" With this, you get 20 positions and a maximum of 10 enemy soldiers starting at any of the 20 positions at random. 😊 Share this post Link to post Share on other sites
avibird 1 141 Posted August 31, 2020 But the units will not be linked together with individual units the AI will be very slow to react if they are not link as a group. That's the beautiful thing about arma there is no wrong way of mission design. Share this post Link to post Share on other sites