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.
Faking combat (or hiding names/target circles)
Débuté par
FergusM
, août 05 2010 09:45
#1
Posté 05 août 2010 - 09:45
#2
Posté 06 août 2010 - 03:32
I can't help with the names/health bars, but if you care more about those being hidden than the fighters reacting properly to each other's blows, you could make them attack an invisible placeable that is in between them using ambient animations.
It's a pretty ghetto solution though.
It's a pretty ghetto solution though.
Modifié par Kilrogg_, 06 août 2010 - 03:32 .
#3
Posté 06 août 2010 - 04:24
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.
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.
#4
Posté 06 août 2010 - 09:58
David, you are absolutely beautiful.





Retour en haut






