{"name":"assignedTarget","title":"assignedTarget","type":"command","url":"https://community.bistudio.com/wiki/assignedTarget","revid":364219,"updated":"2024-05-06T09:38:11Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local"},"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).\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","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["_target = assignedTarget _T72;"]}],"see_also":["getAttackTarget","commandTarget","doTarget","commandWatch","doWatch","effectiveCommander","setEffectiveCommander"]}