Quote:
Originally Posted by awesome144
SelectMoreDangerousThreat is an optional native, but it doesn't have its own property in the methodmap? Also could I get an explanation of its callback function?
|
When
IVision::GetPrimaryKnownThreat is called,
IContextualQuery::SelectMoreDangerousThreat is used to filter/select which
Known Entity the bot should consider as it's primary threat. Generally used when selecting targets to attack.
IContextualQuery::SelectMoreDangerousThreat returns a
CKnownEntity pointer and has 4 parameters: The bot itself, the bot BCC, and two known entities, threat1 and threat2. The function must return if the bot should focus on threat1 or threat2. NULL can be returned for a 'no answer'.
In the extension:
function Action (any action, Address nextbot, int entity, Address threat1, Address threat2, Address& knownEntity). You have the address to threat1 and threat2. The result is stored in the last parameter:
Address& knownEntity.