bindentity and falling to hole

ABK

Well-known member
What is Your solution ? When you fall into a hole - your binded entity is an orphan now and stays onscreen near the hole, and its untouchable. So, whats the cleanest way to solve this ?
Is there a pain anim specific to falling into a hole ? I wanted it many times, maybe there is something?
gonna try with walkoff

------------
solved with walkoff which unbinds entity, and binded entity walkoff anim has killself
thanks bbwd
 
Last edited:
solved with walkoff which unbinds entity, and binded entity walkoff anim has killself
Using this will trigger the unbind even if you jump from a platform into the ground, not only on holes.
But maybe its what you want, since the attacker will be sent to the walkoff anim.

On my game, I've fixed this using a onfallscript

onfallscript data/scripts/dead.c

C-like:
void main()
{
changeopenborvariant("nojoin", 0);
unbind();


void unbind ()
// unbind entity
// 24.09.2013 - Douglas Baldan - O Ilusionista + Kratus
{
   void self = getlocalvar("self");
   void target = getentityvar(self,"grabbed");
   changeentityproperty(self,"subject_to_gravity",1);

   if(target != NULL()){ //USED WHEN PLAYER IS FALLING BY TIME OVER AND THE GRABBER IS THE PLAYER, NEED TO UNBIND THE ENEMY
        bindentity(target, NULL());
        damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL"));
        changeentityproperty(target,"subject_to_gravity",1);
        bindentity(self, NULL());
    setentityvar(self, "grabbed", NULL());
    clearlocalvar();
    }
}

Keep in mind that the way I bind entities is a bit different from BB's method - this is why you see a entityvar line.
you can remove it if you don't need.

Note: bindentity doesn't care for landframes either. Even if you set it to match animation and frame.
 
Good suggestions, i do not have jump anim in weapon that holds bindentity abov ethe head - so its not possible to be on a platform , so im not sure if its going to be a problem, but if its going to be, im gonna change it, so far it looks OK aesthetically and even if it would happen when falling from platforms then it still fits.
I want to unbind when in air and it works ok so far.
 
Back
Top Bottom