{"name":"assignedTarget","operator":null,"title":"assignedTarget","type":"command","url":"https://community.bistudio.com/wiki/assignedTarget","revid":364219,"updated":"2024-05-06T09:38:11Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":null,"server_exec":false},"exec":null,"description":"Returns the target assigned to an unit or the vehicle's effectiveCommander. The target can be assigned by the group/vehicle/formation leader (as player via quick command menu or \"target\" complex command menu).\n\nTo unassign the target use doWatch objNull or commandWatch objNull or as player and group leader order \"no target\" in the \"target\" complex command menu.\n\n> [!NOTE]\n> - This command does not return the target a unit is actually engaging (\"attack unit\"). For this information, see getAttackTarget.\n> - If a player is inside a vehicle as the effectiveCommander, the vehicle's crew assignedTarget will always be objNull.","syntaxes":[{"syntax":"assignedTarget vehicleName","since":null,"effect":null,"exec":null,"params":[{"name":"vehicleName","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicleName: Object"}],"returns":{"type":"Object","types":["Object"],"description":null,"text":"Object"},"form":"unary","operator":null,"left":null,"right":{"text":"vehicleName","types":["Object"]}}],"examples":[{"text":"```sqf\n_target = assignedTarget _T72;\n```","code":["_target = assignedTarget _T72;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getAttackTarget","commandTarget","doTarget","commandWatch","doWatch","effectiveCommander","setEffectiveCommander"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}