I want to release the opponent in a standing position with the slam applied, like a normal grab without the slam script.maybe you can explain in more detail what you want to do here?
@DD TokkiView attachment 4195
I'd like to know how to keep a captured enemy standing without knocking it down when performing a finishing attack.
anim vault #GRAB JUMP FRONT
energycost 0 1 6
loop 0
delay 12
offset 150 187
@cmd sound "data/sounds/sor3_jumping.wav"
@cmd grabStart
@cmd position 0 30 0 0 0
frame data/chars/heroes/max/grabjump00.png
@cmd leaper 0 2.4 0
@cmd keyMove 1 0
frame data/chars/heroes/max/grabjump01.png
frame data/chars/heroes/max/grabjump01.png
delay 2
frame data/chars/heroes/max/grabjump01.png
@cmd landFrame
delay 8
@cmd sound "data/sounds/sor3_jumpland.wav"
frame data/chars/heroes/max/grabjump00.png
@cmd grabEnd
frame data/chars/heroes/max/grabjump00.png
@cmd clearL
frame data/chars/heroes/max/grabjump00.png
void grabEnd()
{//End grab jump and free enemy on the ground if no attack is performed (MAX GRAB JUMP)
void self = getlocalvar("self");
void target = getentityvar(self,"grabbed");
int dead = getentityproperty(target,"dead");
if(target != NULL()){
//USED WHEN PLAYER DIES BY TIME OVER AND THE GRABBER IS THE ENEMY
if(dead){
finishGrab();
setentityvar(self, "grabbed", NULL());
}else
//DEFAULT
{
changeentityproperty(target,"damage_on_landing",0);
changeentityproperty(target,"aiflag","projectile",0);
changeentityproperty(target,"aiflag","falling",0);
changeentityproperty(target,"aiflag","drop",0);
changeentityproperty(target,"aiflag","frozen", 0); //USED TO AVOID GRAB INTERRUPTION WHEN THE NODROPEN IS OFF AND ANY PLAYER IS RESPAWNED
changeentityproperty(target,"takeaction", "common_animation_normal");
setidle(target);
finishGrab();
setentityvar(self, "grabbed", NULL());
}
}
}
thank you@DD Tokki
I'm using a similar feature for Max during the grab jump move. In case the player didn't perform any attack, he will release the opponent in an idle instance as soon as reaches the ground. You could maybe adapt the script to fit in your game.
C:anim vault #GRAB JUMP FRONT energycost 0 1 6 loop 0 delay 12 offset 150 187 @cmd sound "data/sounds/sor3_jumping.wav" @cmd grabStart @cmd position 0 30 0 0 0 frame data/chars/heroes/max/grabjump00.png @cmd leaper 0 2.4 0 @cmd keyMove 1 0 frame data/chars/heroes/max/grabjump01.png frame data/chars/heroes/max/grabjump01.png delay 2 frame data/chars/heroes/max/grabjump01.png @cmd landFrame delay 8 @cmd sound "data/sounds/sor3_jumpland.wav" frame data/chars/heroes/max/grabjump00.png @cmd grabEnd frame data/chars/heroes/max/grabjump00.png @cmd clearL frame data/chars/heroes/max/grabjump00.png
C:void grabEnd() {//End grab jump and free enemy on the ground if no attack is performed (MAX GRAB JUMP) void self = getlocalvar("self"); void target = getentityvar(self,"grabbed"); int dead = getentityproperty(target,"dead"); if(target != NULL()){ //USED WHEN PLAYER DIES BY TIME OVER AND THE GRABBER IS THE ENEMY if(dead){ finishGrab(); setentityvar(self, "grabbed", NULL()); }else //DEFAULT { changeentityproperty(target,"damage_on_landing",0); changeentityproperty(target,"aiflag","projectile",0); changeentityproperty(target,"aiflag","falling",0); changeentityproperty(target,"aiflag","drop",0); changeentityproperty(target,"aiflag","frozen", 0); //USED TO AVOID GRAB INTERRUPTION WHEN THE NODROPEN IS OFF AND ANY PLAYER IS RESPAWNED changeentityproperty(target,"takeaction", "common_animation_normal"); setidle(target); finishGrab(); setentityvar(self, "grabbed", NULL()); } } }
You need to adapt the script to use the variables and functions related to the grab system in your game. For example, theWhen I write the grabEnd code in the script, the game stops and I can't proceed.
finishGrab() is similar to the @cmd finish and the getentityvar(self,"grabbed") is similar to the getlocalvar("target"+self).Yes, this is correct.animationscript data/scripts/script.c