health=45;
//this is the start set code
//set 45 to any health point you want
health-=3;
//this is the damaging code
//set the 3 to any damage value you want
if(health<=0)
{
//dying code here
//use what action you want to use as the dying action
}
Superbeni wrote:wouldn´t it be better to put the code for dying into the collision-code?
Users browsing this forum: No registered users and 1 guest