Hi again HowDo!
Im still working for a solution and im almost done, i hope. Now i each enemy object can get killed and they will die if enehealth = 0 (enemies healthbar). But only one enemie can die, cause there seems to be only one healthbar!
make_enemies:
rem make 3 enemies
for i = 25 to 26 `(object number 25,26)
load object "CharactersAI.x", i
position object i,i*5 + 500,300,-200
scale object i,60,60,60
yrotate object i,180
fix object pivot i
make object i+1000,2,11
set object light i+1000,0
hide object i+1000
rem add them to the enemy team and set their speed (in units per second)
AI Add Enemy i
AI Set Entity Speed i,80
AI Set Entity Aggressive i
AI Set Entity View Arc i,90,180
AI Set Entity View Range i,200
AI Set Entity Hearing Range i,400
AI Set Entity Can Strafe i,1
set object speed i,40
enehealth=100 REM <<<--------------------------------------
next i
for i=25 to 25
if object collision(11,i)>0 and enehealth=>0
dec enehealth,10
if enehealth=<1 then hide object i : AI Kill Entity i and Ai entity exist (i) =0
endif
next i
for i=26 to 26
if object collision(11,i)>0 and enehealth=>0
dec enehealth,10
if enehealth=<1 then hide object i :AI Kill Entity i and Ai entity exist (i) =0
endif
next i
Do you know a way to make one healthbar per each enemy? Cause now when first enemy is dead the otherone wont die.
Hello!