So basicly I have tryed many things here but none trully works well. this is what i am trying to do here.
so this here is the main code to make my guy attack me
if AI Get Entity Action$ (e1)="Stopped And Attacking" then loop object e1,431,460:dec player(thirdpersonplayer).Health,1
but i loose health even if he is not really attacking and i loose it fast to. i tryed this here
if AI Get Entity Action$ (e1)="Stopped And Attacking" and attack=0
loop object e1,431,460:dec player(thirdpersonplayer).Health,1
attack=1
endif
and repeded this a coulple times to reset it back to 0 but he only attacks here and there and real slow but my health still goes to 0 real fast to. please help me with any good ideas