Page MenuHomeFeedback Tracker

"attackTarget" command to return AI unit current target
New, NormalPublic

Description

"assignedTarget" often returns nothing, even when the AI is shooting at something.

For AI mods, its very important to know what an AI unit is shooting at, right now we have no way.

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
AI Aiming / Shooting
Steps To Reproduce
Before:
<unit> addEventHandler [
	'FiredMan',
	{
		// what is he shooting at?
	}
];

After:
<unit> addEventHandler [
	'FiredMan',
	{
		params ['_unit'];
		_unit doSuppressiveFire (attackTarget _unit);				// suppress the target instead of regular fire
		_unit removeEventHandler ['FiredMan',_thisEventHandler];
	}
];
Additional Information

Event Timeline

MDCCLXXVI edited Additional Information. (Show Details)Feb 28 2018, 9:50 AM