assignedTarget – Talk
Jump to navigation
Jump to search
havocsquad (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<code>" to "<code style="display: block">") |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
--[[User:Havoc|Havoc]] 16:25, 25 December 2006 (CET) | --[[User:Havoc|Havoc]] 16:25, 25 December 2006 (CET) | ||
:Yes, it seems to. At least in Arma2 1.05. I did a test with an Apache and with a rifleman, using an init-field of | |||
: <code style="display: block">nul = this spawn { while{alive _this} do { sleep 0.2; hintSilent str(assignedTarget _this); }; };</code> | |||
:to watch what they were up to, and in both cases once they autonomously targeted an enemy, it was shown in the hint dialog. In the case of the soldier he was the only one in the group, so wasn't assigned a target by a separate leader. Might be interesting to note that they don't immediately target everything they see - I was using [[switchCamera]] to show me the AI's POV and the rifleman had a square "lock" indicator come up shifting between two enemies he'd spotted, and it took a while before he actually decided to target one. --[[User:Nomdeplume|nomdeplume]] 18:14, 31 December 2009 (CET) |
Latest revision as of 11:53, 11 January 2023
Does this function return the current target of a unit in all instances? This means does it return the target of a unit whether another unit or scripting assigns it and/or when the unit choses the target by itself.
--Havoc 16:25, 25 December 2006 (CET)
- Yes, it seems to. At least in Arma2 1.05. I did a test with an Apache and with a rifleman, using an init-field of
nul = this spawn { while{alive _this} do { sleep 0.2; hintSilent str(assignedTarget _this); }; };
- to watch what they were up to, and in both cases once they autonomously targeted an enemy, it was shown in the hint dialog. In the case of the soldier he was the only one in the group, so wasn't assigned a target by a separate leader. Might be interesting to note that they don't immediately target everything they see - I was using switchCamera to show me the AI's POV and the rifleman had a square "lock" indicator come up shifting between two enemies he'd spotted, and it took a while before he actually decided to target one. --nomdeplume 18:14, 31 December 2009 (CET)