a) On during and out of Combat
b) Off when engaged in Melee
c) Off when Health is less than 40%
Can the following below be adapted to work this way.. Currently, the following activates the ability in combat only and off when not in combat.
--toggle ability to be used during combat and off when not DoAbilityToggleCombat = function( squad_ai, id, msg ) if squad_ai:CanDoAbility( id ) and not squad_ai:IsAttached() then local using = squad_ai:IsUsingAbility( id ) local combat = squad_ai:IsInCombat() local move = cpu_manager:IsMoving( squad_ai ) or cpu_manager:InSubState( squad_ai:GetID() ) if ( using == true and combat == false and move == true) or ( using == false and ( combat == true or move == false) ) then squad_ai:DoSpecialAbility( id ) end end end,Any help would be appreciated. This will be a step towards more elaborate ability toggles.