script based staydown

Bloodbane

Well-known member
How to set staydown feature with script? I'd like to set this to slammed opponent. The slam is scripted too of course.
 
Code:
changeentityproperty(ent, "staydown", subproperty, value);

Subproperty is one of these three strings: "rise", "riseattack", or "riseattack_stall".
 
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.
 
I think that is because dol is actually another attack, which has its own staydown value.
This is currently unchecked, so setting that after landframe is the trick.
 
Utunnels is right, DOL is another attack, which is actually a good thing; we could probably look at adding a check for the staydown property. Only problem is, DOL is not always another attack. There is provision in the code to simply lower health instead. I'm not sure what circumstances it is intended for.

Code:
// 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.

This is my problem with staydown in @cmd finish, and @cmd throw.

Can you show me how you fix it?

Thanks.
 
Back
Top Bottom