Page 1 of 1

How do you make one of many ennemies die after 5 shots

PostPosted: Thu Jan 26, 2006 1:11 pm
by supaboy86
I am making a Metroid Prime type game and I don't know how to kill an enemy by shooting it by a certain number of times. Need serious help!

Email me @ badboi06@aol.com please

PostPosted: Thu Jan 26, 2006 2:15 pm
by supaboy86
my computer takes too long to come to this site. Thank you.

PostPosted: Thu Jan 26, 2006 6:50 pm
by Novice
Make an actor integer varable called enemyHealth.
On create enemy enemyHealth=5;
On enemy collision with bullet enemyHealth--;
On draw enemy
Code: Select all
if (enemyHealth<=0) DestroyActor("Event Actor");

Later you can just create clones of this enemy and every one will have its own health. If any of these terms are unclear check out the tutorials, the forum search or GE documentation, but feel free to ask any questions thats why we are here. Hope this helps.

PostPosted: Thu Jan 26, 2006 8:41 pm
by Game A Gogo
and remenber to not put the integer to global.
or, when you shoot an enemy the enemy healt will go down too.