anusmangler 1 Posted November 3, 2013 Ive been trying to get a single unit to fire at a target. I atleast got him to look at it, trigger on act : person selectWeapon "arifle_MX_F"; person lookAt markerPos "targetmarker"; person fire ["arifle_MX_F","30Rnd_65x39_caseless_mag_Tracer"]; person being the units name and targetmarker is the marker with the name i would like him to shoot at. any help or something im doing wrong? Share this post Link to post Share on other sites
chrs 2 Posted November 3, 2013 need to target first u1 dotarget e1; u1 dofire e1; example is with two units named e1 and u1 lines of code go in onact feild of a trigger Share this post Link to post Share on other sites
anusmangler 1 Posted November 3, 2013 So now i have this "u1 dotarget e1; u1 dofire e1; u1 selectWeapon "arifle_MX_F"; person lookAt markerPos "e1"; u1 fire ["arifle_MX_F","30Rnd_65x39_caseless_mag_Tracer"]; " and the unit only throws grenades at the target...anyway of him firing his rifle? Share this post Link to post Share on other sites
jw custom 56 Posted November 4, 2013 place 2 riflemen near eachother and name one unitShooter and the other unitTarget. Then add a radio trigger with the below on act works for me: mainMuzzle = ((weapons unitShooter) select 0); unitShooter selectWeapon mainMuzzle; unitShooter doFire unitTarget Share this post Link to post Share on other sites
anusmangler 1 Posted November 6, 2013 the "unitShooter" still only throws grenades....which blows my mind because i took them from him. so idk how that happens. any other solutions? or something i could be doing wrong. I dont want them to shoot another unit....I want them to fire at a static target like "simple target 1" so when you walk by it looks like guys are in a firing drill session. Share this post Link to post Share on other sites
Phaedin 10 Posted November 6, 2013 I use this to have a unit fire a RPG at a predefined target. In this case a battery above the tail rotor of a heli. //nul=[AAMan1,TestBird] execvm "FireMissile.sqf" _AAMan1 = _this select 0; //AT/AA man who will fire missile missile _Heli = _this select 2; _fakeTarget = "Land_Battery_F" createVehicle (getPos _Heli); _fakeTarget attachTo [TestBird, [0, -6, -10]]; doStop _AAMan1; _AAMan1 setUnitPos "up"; _pWeap = primaryWeapon _AAMan1; _AAMan1 selectWeapon _pWeap; _AAMan1 doTarget _Heli; _AAMan1 doFire _Heli; Code was adapted from http://www.kylania.com/ex/?p=21 Share this post Link to post Share on other sites
anusmangler 1 Posted November 6, 2013 Phaedin can you go into a little bit more detail here. I'm figuring this is in a SQF. How about something for a rifleman shooting a target? thanks so far guys Share this post Link to post Share on other sites