Problems with grab forward animation, random error.

yairvondoom

New member
Hi
I need your help, I have tried several ways to find the error and I have not been able to find it, sorry I am new to this, I don't know what to do anymore, I would appreciate your help.

Let me explain. I'm getting errors like: Vitality drops to 100% when executing the THROW command, and sometimes it drops to 15%. Then, when I pass the next stage, it happens again, dropping the enemy's Vitality to 100%, or the OpenBoard window simply closes. (Excuse my English.)

statement:

anim grabforward

fastattack 1
loop 0
offset 77 145
attackone 0
delay 38

@cmd slamstart
@cmd position 0 3 3 1 -1
frame data/chars/hulk/grab_throw_01.gif
delay 9
@cmd pisotion 0 -31 25 1 -1
data/chars/hulk/grab_throw_02.gif
data/chars/hulk/grab_throw_03.gif
@cmd position 1 49 1 0 1
@cmd depost 0
@cmd throw 10 3 2.5 2.5 0 1
@cmd clearL
data/chars/hulk/grab_throw_04.gif
data/chars/hulk/grab_throw_05.gif
data/chars/hulk/grab_throw_06.gif

greetings!
 
Hello @yairvondoom and welcome to the forum, at a guess I would say your @cmd throw is asking for something that the enemy doesn't have like fall/attack type for example, could you post your throw script?
 
I have tried several ways to find the error and I have not been able to find it, sorry I am new to this, I don't know what to do anymore, I would appreciate your help.

From your post, looks like there are two unrelated issues but I take it that you're referring GRABFORWARD as THROW animation.

Anyways, I don't recommend declaring grab functions on same frame. I suggest doing it like this:
C:
anim grabforward
offset 77 145
delay 38
@cmd slamstart
@cmd position 0 3 3 1 -1
frame data/chars/hulk/grab_throw_01.gif
delay 9
@cmd position 0 -31 25 1 -1
data/chars/hulk/grab_throw_02.gif
@cmd position 1 49 1 0 1
data/chars/hulk/grab_throw_03.gif
@cmd depost 0
@cmd throw 10 3 2.5 2.5 0 1
data/chars/hulk/grab_throw_04.gif
data/chars/hulk/grab_throw_05.gif
@cmd clearL
data/chars/hulk/grab_throw_06.gif
 
Hola @yairvondoom y bienvenido al foro, supongo que tu lanzamiento @cmd está pidiendo algo que el enemigo no tiene, como tipo de caída/ataque, por ejemplo, ¿podrías publicar tu script de lanzamiento?
Hola @yairvondoom y bienvenido al foro, supongo que tu lanzamiento @cmd está pidiendo algo que el enemigo no tiene, como tipo de caída/ataque, por ejemplo, ¿podrías publicar tu script de lanzamiento?
¡Gracias por responder!

Los scripts que estoy usando son:

datos de animationscript/scripts/grabscript.c

datos de scripts de teclas/scripts/ironkey.c

datos de animationscript/scripts/lib001.c

datos de ondrawscript/scripts/shadowon.c

¿Creo que podrían ser los scripts que estoy usando?

Saludos, comunidad.
Hola @yairvondoom y bienvenido al foro, supongo que tu lanzamiento @cmd está pidiendo algo que el enemigo no tiene, como tipo de caída/ataque, por ejemplo, ¿podrías publicar tu script de lanzamiento?

Sí, el problema surge al usar clearL en el mismo cuadro del lanzamiento , ya que lo anula instantáneamente.
Siempre es mejor usarlo en el siguiente cuadro.

Hello @yairvondoom and welcome to the forum, at a guess I would say your @cmd throw is asking for something that the enemy doesn't have like fall/attack type for example, could you post your throw script?
Thanks for responding!

The scripts I'm using are:

animationscript data/scripts/grabscript.c

keyscript data/scripts/ironkey.c

animationscript data/scripts/lib001.c

ondrawscript data/scripts/shadowon.c

I think it could be the scripts I'm using?

Regards, community.
 
From your post, looks like there are two unrelated issues but I take it that you're referring GRABFORWARD as THROW animation.

Anyways, I don't recommend declaring grab functions on same frame. I suggest doing it like this:
C:
anim grabforward
offset 77 145
delay 38
@cmd slamstart
@cmd position 0 3 3 1 -1
frame data/chars/hulk/grab_throw_01.gif
delay 9
@cmd position 0 -31 25 1 -1
data/chars/hulk/grab_throw_02.gif
@cmd position 1 49 1 0 1
data/chars/hulk/grab_throw_03.gif
@cmd depost 0
@cmd throw 10 3 2.5 2.5 0 1
data/chars/hulk/grab_throw_04.gif
data/chars/hulk/grab_throw_05.gif
@cmd clearL
data/chars/hulk/grab_throw_06.gif
The same problem persists,
when you go to the next level, when you throw the enemy it automatically subtracts 100% of its HP.
 
@cmd throw

C:
void throw(int Damage, int Type, int x, int y, int z, int Face){
    void self = getlocalvar("self");
    void target = getlocalvar("Target" + self);
    int SDir = getentityproperty(target,"direction");
    int MDir;
    if(Face==0){
        MDir = SDir;
    }if(Face==1){
        if(SDir==0){
            MDir = 1;
        }else { MDir = 0;}
    }if(target==NULL()){
        target = getentityproperty(self, "grabbing");
        setlocalvar("Target" + self, target);
    }if(target!=NULL()){
        int dir = getentityproperty(target,"direction");
        if(dir==0){
            x = -x;
        }if(Type==1){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL"));
        }if(Type==2){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL7"));
        }if(Type==3){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL9"));
        }
        changeentityproperty(target, "attacking", 1);
        changeentityproperty(target, "damage_on_landing", Damage);
        changeentityproperty(target, "projectile", 1);
        changeentityproperty(target, "direction", MDir);
        tossentity(target, y, x, z);
    }

Your throw code should look similar to this and can you post the OpenBorLog.txt when the OpenBor window closes.
 
C:
void throw(int Damage, int Type, int x, int y, int z, int Face){
    void self = getlocalvar("self");
    void target = getlocalvar("Target" + self);
    int SDir = getentityproperty(target,"direction");
    int MDir;
    if(Face==0){
        MDir = SDir;
    }if(Face==1){
        if(SDir==0){
            MDir = 1;
        }else { MDir = 0;}
    }if(target==NULL()){
        target = getentityproperty(self, "grabbing");
        setlocalvar("Target" + self, target);
    }if(target!=NULL()){
        int dir = getentityproperty(target,"direction");
        if(dir==0){
            x = -x;
        }if(Type==1){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL"));
        }if(Type==2){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL7"));
        }if(Type==3){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL9"));
        }
        changeentityproperty(target, "attacking", 1);
        changeentityproperty(target, "damage_on_landing", Damage);
        changeentityproperty(target, "projectile", 1);
        changeentityproperty(target, "direction", MDir);
        tossentity(target, y, x, z);
    }

Your throw code should look similar to this and can you post the OpenBorLog.txt when the OpenBor window closes.

C:
void throw(int Damage, int Type, int x, int y, int z, int Face){
    void self = getlocalvar("self");
    void target = getlocalvar("Target" + self);
    int SDir = getentityproperty(target,"direction");
    int MDir;
    if(Face==0){
        MDir = SDir;
    }if(Face==1){
        if(SDir==0){
            MDir = 1;
        }else { MDir = 0;}
    }if(target==NULL()){
        target = getentityproperty(self, "grabbing");
        setlocalvar("Target" + self, target);
    }if(target!=NULL()){
        int dir = getentityproperty(target,"direction");
        if(dir==0){
            x = -x;
        }if(Type==1){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL"));
        }if(Type==2){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL7"));
        }if(Type==3){
            damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL9"));
        }
        changeentityproperty(target, "attacking", 1);
        changeentityproperty(target, "damage_on_landing", Damage);
        changeentityproperty(target, "projectile", 1);
        changeentityproperty(target, "direction", MDir);
        tossentity(target, y, x, z);
    }

Your throw code should look similar to this and can you post the OpenBorLog.txt when the OpenBor window closes.
It doesn't seem to be generating an error.

Attach the log:

www.mediafire.com/file/eazrahwksgkbz3q/Los.rar/file
 
Thanks, now I could see the files myself.

I noticed these lines in hulk.txt:
Code:
animationscript data/scripts/grabscript.c
keyscript  data/scripts/ironkey.c

animationscript  data/scripts/lib001.c
ondrawscript     data/scripts/shadowon.c

Having two animationscript is wrong, you have to choose one or the other. I suggest removing the first line (grabscript.c).
 
Back
Top Bottom