Arvic92 10 Posted February 16, 2014 (edited) Currently I want something along the lines of gunner _unit doWatch _target; on a hunter/ifrit/slammer but this doesn't seem to effect the vehicle in any way. CLARIFICATION: I want the turret to point a specific spot for the purpose of engaging targets Edited February 17, 2014 by Arvic92 Share this post Link to post Share on other sites
laxemann 1673 Posted February 16, 2014 Simply using the vehicle's name usually does the job for me, so no need to use the "gunner" argument. Try that. :) Share this post Link to post Share on other sites
Arvic92 10 Posted February 17, 2014 I stripped my code down to clearly demonstrate my dilemma. I have tried your way of phrasing the doWatch command and it does nothing either BluCar1 = 50. cal static BluCar2 = Marshal BluCar3 = Hunter HMG Red1 = CSAT rifleman ~300 meters away Init.SQF call {[bluCar1,Red1] execVM "TestScript.SQF"}; call {[bluCar2,Red1] execVM "TestScript.SQF"}; call {[bluCar3,Red1] execVM "TestScript.SQF"}; TestScript.SQF private ["_unit","target"]; _unit = _this select 0; _target = this select 1; while {true} do { //Alert action ["useweapon",_unit,gunner _unit,1]; _unit doWatch _target; hint "Watching"; sleep .5 }; Share this post Link to post Share on other sites
f2k sel 164 Posted February 17, 2014 I don't see the need for wrapping the execvm in a call {} null=[bluCar1,Red1] execVM "TestScript.SQF"; or {null=[_x] execvm "testscript.sqf"} foreach [bluCar1,BluCar2,BluCar3] should work. also error in _target = this select 1; your missing underscore _target = _this select 1; and again in private ["_unit","target"]; Share this post Link to post Share on other sites
Arvic92 10 Posted February 17, 2014 derp I think I know how those errors got there. This is based off of a larger older script that I've use in a past mission. I must of screwed up when adding in target as a parameter. Share this post Link to post Share on other sites