f00bar 10 Posted March 24, 2011 After some searching in the usual places I was unable to find an AI sniper addon or script that simulates urban snipers or ambushes from "within" buildings. What I was envisioning is an AI unit that appears to be firing from "inside" a building or structure, that can harass the player and is destructible. Whether or not the building is technically "enter-able" would not matter as much as the AI sniper unit being dangerous until incapacitated or destroyed. The AI would never need to enter a building. The sniper would be simulated as a floating 2D overlay or proxy on the outside wall of any building or structure (a 2 dimensional X,Y square target around 1m X 1m) on the outside wall of the building representing the destroyable target. The sniper "nest" locations could be standardized as in: height (Z co-ord) relative to windows (0', 10', 20', etc. - corresponding to building levels), and horizontal (X,Y) location in 1 meter gradations. Destroying the building completely would be one way to eliminate the sniper (difficult for infantry to do without support) but hitting the 2D target overlay directly with an M203 or RPG would eliminate the sniper. Alternatively, hitting the target overlay with small arms fire could "suppress" the sniper and trip a delay, providing the player with a chance to move from cover or advance. Sighting the sniper's location would be difficult (as in real life) as no modifications would be made to the appearance of buildings. Players would need to look for a barrel sticking out of a window, muzzle flashes or maybe rely on their AI team members to figure out where they were taking fire from. Right now I am just brain-storming but any input on this subject would be appreciated.:) Share this post Link to post Share on other sites
Blitzen 10 Posted March 29, 2011 This sounds interesting to me because you dont seem to care if an actual unit is shooting at you. Of course you want to be fired upon but a simple script simulating incoming rounds from a certain position is seemingly what you want. Though I wish something could be done to enhance OFP's CQB aspect, I personally would much prefer to find an actual unit shooting at me instead of searching around to find fire coming from an un-enterable building. :( Anyways, back to your request, I dont know of any such script that simulates fire coming at you. Though I think it could be done, I believe that the only way for it to work would be to camcreate a bullet and have it move in your direction. How accurate would this be? I dunno. Would the script take in account for a target being behind a building? Probably not. It seems like there would be a lot of issues with such a script. Are you totally opposed to putting a unit in an enterable building? Or for that matter, on top of an unenterable building? Share this post Link to post Share on other sites
f00bar 10 Posted March 29, 2011 From what I understand, urban combat can be fairly well simulated using AI units placed in resistance houses (the ones with detailed interiors & doors) positions. The downside of this is that you have the all the interior details and engine overhead that go along with them. This would be fine for a small squad sized mission in a small village/town taking on one or two snipers, but would be limiting if you had tens of buildings each with a few units in them. I think there has to be a fine balance between medium/long range combat in open areas and urban combat. Being able to transition between both would add a lot to the game. Simulating house clearing should probably not involve the player entering the buildings & personally shooting the sniper in the back of the head while he is still looking out the window like in some games ;) In most situations the best strategy would be to either clear each room with a grenade or use a satchel charge to incapacitate anyone inside the building (by using concussion & collapsing/pancaking floors). This could be achieved by having a "door" trigger on the building that adds a player action to "Clear House" as long as the player has a satchel charge or an engineer is assigned to do it. Another nice touch would be to require a shotgun or "masterkey" equipped unit to breach the door first before the charge can be used :) The simplest approach is to probably create a new rectangular building with a couple of "windows" & "doors" which are simply trigger areas on the house model that can be affected by the player or friendly AI. This includes: "windows" to allow the enemy AI to fire from & for the player & friendly AI to destroy them and; "doors" to enable clearing the house. Not actually seeing the snipers inside the house or having them running into & out of buildings would actually be quite realistic. In many urban combat situations holes between basements, apartments & rooms and sewers were all used to get around because moving around in the open was so deadly. This factor would also realistically increase the value of combined operations strategy where APCs & tanks would be very valuable in urban combat. Share this post Link to post Share on other sites
f00bar 10 Posted April 1, 2011 In further researching this topic, I found this wikipedia.org entry very helpful: http://en.wikipedia.org/wiki/Urban_warfare Also, the "Joint Publication 3-06 Joint Urban Operations" Handbook for Joint Urban Operations from the Defense Technical Information Center http://www.dtic.mil provides a lot of in-depth information on current US Urban warfare strategy: http://www.dtic.mil/doctrine/new_pubs/jp3_06.pdf#search=%22urban%22 It's around 170 pages & extremely acronym heavy but it provides a lot of interesting info. Share this post Link to post Share on other sites
Blitzen 10 Posted April 5, 2011 Been doing some thinking about this... Could you put a unit inside a non-enterable building, and then adjust his vertical height to match a window. Then move him forward so that only his gun is sticking out of the building? Obviously this would work best with something like a DSHK machinegun. Share this post Link to post Share on other sites
f00bar 10 Posted April 7, 2011 I tried placing both a player & AI unit inside a closed building with mixed results. When the player is inside the building the wall disappears but you can still walk through it. Placing an AI player inside a closed building appears to trap it inside and not fire. There is some good info in this thread from the OFPEC forums on placing units inside buildings with doors/windows: http://www.ofpec.com/forum/index.php?topic=11541.0 Basically making use of: setBehaviour http://community.bistudio.com/wiki/setBehaviour setUnitPos http://community.bistudio.com/wiki/setunitpos switchMove http://community.bistudio.com/wiki/switchMove Operation Flashpoint: Moves List http://community.bistudio.co/wiki/Operation_Flashpoint:_Moves_List I'm trying to get some time to play around with creating an invisible, 2 dimensional (flat, minimal "Z" depth) vehicle with no driver proxy. The unit inside would be invisible and would serve as a sniper nest that could be placed via a script or in the mission editor . My theory is that this sniper nest vehicle could then be placed very close to the walls of a closed building from which the sniper inside could fire. Share this post Link to post Share on other sites
f00bar 10 Posted April 11, 2011 This weekend I put together a test urban sniper nest "vehicle" that is a simple rectangle with no texture, no driver/gunner/cargo proxies & a WW4 Mod M24 sniper rifle model sticking out of it. In-game pictures: http://bit.ly/g6SSKA http://bit.ly/gioDTP I set the vehicle mass to 0kg & used SetPos to position the vehicles "floating" above the ground: this setPos [getPos this select 0, getPos this select 1, 10] In-game pictures: http://bit.ly/eE1H1z http://bit.ly/fuBnAm http://bit.ly/hKkIfW However, some interesting effects occur when the zero mass vehicle is shot at. It flies away from the shooter, spinning like an object sliding across a sheet of ice. In-game picture (after a few rounds are fired): http://bit.ly/ekG4wi If it is not possible to have a zero mass vehicle stay in place when shot at it will probably be easier just to make the vehicle the size & shape of a building. The pros of using a vehicle as a sniper nest are: The driver can act as a spotter for the sniper The sniper nest can have a sniper rifle weaponthe player can aim & fire Sniper rifle optics can be added to the turret Player(s) can enter a sniper nest Destroying the vehicle adds damage effects Cargo passenger spots allow for multiple units The sniper nest can store ammo & weapons A few things I need to check are: Does giving the Driver/Spotter binoculars improve lethality? Can a vehicle with mass be SetPos'd to float near a building? Figure out relevant model selections See if it is possible to have the sniper nest stay level on uneven terrain Share this post Link to post Share on other sites
maturin 12 Posted April 11, 2011 Variations on this script could be a godsend for mission makers. In my mind, the single most unrealistic thing about Arma firefights is that you always see the enemy. Then you shoot and kill them. How awesome would it be to have situations like those in Afghanistan helmet cam footage, where the enemy is harassing you by shooting through tons of foliage. They probably won't hit you, but you have constant incoming fire and a target for artillery. Share this post Link to post Share on other sites
f00bar 10 Posted April 11, 2011 I wonder if it would be possible to create a foliage sniper nest vehicle that would use a tree or bush model & have one or more occupants? The model would need to be the same as the other foliage on the map the mission was created for so the sniper nest would blend in with the scenery. Depending on the player's preferences & skill level, detecting the sniper nest could involve anything from; Hardest: having to listen for gunfire sound direction & looking for gun smoke & muzzle flashes, to; Easiest: seeing a gun barrel extruding from foliage or a "sniper indicator" which could place a pointer above the sniper's position once detected. The other good thing about this is that the player wouldn't see any enemy unit models until either the snipers/ambushers were flushed out & retreating from cover or when the player is clearing the area & checking corpses after heavily suppressing the nest with small arms fire, mortars or artillery. I couldn't find any direct way to place trees or bushes in the mission editor but perhaps there is an editor upgrade that allows this. Share this post Link to post Share on other sites
maturin 12 Posted April 11, 2011 I'm pretty sure there is a way to place vegetation in the editor. I can place things like entire houses because a usermade map I downloaded added them to the Empty category, and I think there are some bushes in there too. So someone has figured it out. The bush would just have to look like a bush. It probably couldn't and wouldn't have viewblock, respond to wind or be destructible. And the sniper wouldn't have to be invisible. If you could sneak him in at the bottom where he would rotate like a static MG, most players would be oblivious. You would just have to make his very hard for the AI to spot. This way, suppressing fire could be effective (if that works against static weapons). Share this post Link to post Share on other sites
f00bar 10 Posted April 11, 2011 I think the trick with placing AI units in a specific bush or tree on a map would be keeping them in the desired location relative to the foliage or building model the player sees. As you suggested, a sniper laying prone near the base of a bush for example. To some extent this can be addressed by using a vehicle for the nest. Perhaps the driver (spotter) and the gunner (sniper) proxies could both be prone & lying beside each other at the base of the bush. I'm not sure if it's common for snipers to set up blinds in trees but this could be simulated too. I think for urban snipers/ambushers having hidden units with visible weapons (turrets) would work well but I agree that snipers covering in foliage should be visible (as visible as a ghillie suit at the base of a bush would be :) ) Share this post Link to post Share on other sites
maturin 12 Posted April 11, 2011 Most bushes would block the sniper's line of sight, though. The idea is a special bush that allows the shooter to fire from concealment, and if it's a vehicle or static object, the shooter will never move, no matter what. And I don't just mean snipers. A unit that would just pour hundreds of rounds through a blind of foliage in the general direction of the enemy would be great. Share this post Link to post Share on other sites