Aller au contenu

Photo

Faking combat (or hiding names/target circles)


1 réponse à ce sujet

#1
FergusM

FergusM
  • Members
  • 460 messages
I have a bunch of creatures who I want to fight each other (they are not hostile to the player). They are set to 'non-interactive' so that they won't be highlighted/display their names on tab or mouseover. However, when they are in combat (even if the player is not), their blue targetting circles automatically appear and names/health bars will appear on tab.

Is there any way to supress this behaviour?

I notice there is an ambient command for attacking a target, however, this seems to have been designed for attacking placeables and thus is not suitable for my needs. The method used (issuing attack commands) can't be used for creatures because non-hostile creatures cannot attack each other.

#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
The standard combat ai automaticaly sets creature to be interactive every time a combat action is taken. It's done through scripting, so it can be avoided.



If you don't mind overriding core scripts, you could open ai_main_h_2 and comment out line 375 and recompile rules_core. That would disable the fail safe on all creature, and there's a chance that could break the main campaign somewhere, but it should work in a custom module.



The more local solution is to set CUSTOM_AI_ACTIVE on the creature to 1, and then in the creatures script use the event EVENT_TYPE_HANDLE_CUSTOM_AI to determine who to attack. If you don't want to write your own ai, the function AI_DetermineCombatRound_Light will pick a target and do a basic attack.