// takedamage if thrown or basted
if(self->damage_on_landing > 0 && !self->dead)
{
if(self->takedamage)
{
attack = emptyattack;
attack.attack_force = self->damage_on_landing;
attack.attack_type = ATK_LAND;
self->takedamage(self, &attack);
}
else
{
self->health -= (self->damage_on_landing * self->defense[ATK_LAND].factor);
if(self->health <=0 ) kill(self);
self->damage_on_landing = 0;
}
}
Bloodbane said:It works great! thanks Plombo!
Though for some reason setting damageonlanding via script cancels staydown effect. I solved this by setting staydown after landing instead.