Disabling Grabs From Throwing AND Frame Not Forced To Grabs

maxman

Well-known member
I'm planning to create a car object for it to not be thrown by players for the bonus stage since every player has slamstart2 function for grapples. Also, I want the enemy to not be able to grab one specific character (as a weapon character), same for players when it comes to one specific enemy. One enemy can use slamstart2 to grab players, but not all of them. How can I make one player not being grabbed by an enemy? (I don't want the enemy to be grabbing all players including weapon ones.)

I'm having trouble with the player (weapon mode) posing with the first frame of anim jump (attachment below) before she plays her fall4 anim, even though I use slamstart2 on the enemy to force her to play her pain frame, starting with 0 and then 1 in position. I don't get why the target starts to play her while standing before it gets grabbed. Yes, I have clearL in the enemy's idle anim.

bor - 0079.png

Here're the codes.

Code:
anim attack2

    offset 90 148
    delay 11
    range -6 26
    followcond 2
    followanim 4
    attack 73 100 51 40 0 1 0 1 0 0
    hitfx data/sounds/null.wav
    bbox 69 98 38 55
    frame data/chars/malmor/stand1.png
    
anim follow4
    offset 90 148
    delay 64
    @cmd slamstart2
    @cmd position 0 22 31 0 -1
    frame data/chars/malmor/eat1.png #Grab
    @cmd randAni openborconstant("ANI_FOLLOW1") openborconstant("ANI_FOLLOW2") openborconstant("ANI_FOLLOW3")
    frame data/chars/malmor/eat1.png #Grab
    
anim follow1 #Bite once
    offset 90 148
    delay 32
    @cmd slamstart2
    @cmd position 0 22 31 0 -1
    frame data/chars/malmor/eat1.png #Grab
    @cmd position 1 22 31 0 -1
    frame data/chars/malmor/eat2.png #Start biting
    @cmd hp 5
    @cmd hurt2 5
    sound data/sounds/phy_dmgbone_03.wav
    frame data/chars/malmor/eat1.png #Bite
    frame data/chars/malmor/eat2.png #Start tossing
    delay 2
    @cmd terminateAlias "EmmaSparkles"
    frame data/chars/MalMor/throw3.png
    delay 32
    bbox 70 91 34 59
    @cmd depost
    @cmd throw 8 3 -2.1 3 0 -1 #throw {damage} {type} {x} {y} {z} {facing}
    @cmd clearL
    frame data/chars/MalMor/throw3.png #Toss


anim follow2 #Bite twice
    offset 90 148
    delay 32
    @cmd slamstart2
    @cmd position 0 22 31 0 -1
    frame data/chars/malmor/eat1.png
    @cmd position 1 22 31 0 -1
    frame data/chars/malmor/eat2.png
    @cmd hp 5
    @cmd hurt2 5
    sound data/sounds/phy_dmgbone_03.wav
    frame data/chars/malmor/eat1.png # One
    frame data/chars/malmor/eat2.png
    @cmd hp 5
    @cmd hurt2 5
    sound data/sounds/phy_dmgbone_03.wav
    frame data/chars/malmor/eat1.png #Two
    frame data/chars/malmor/eat2.png
    delay 2
    @cmd terminateAlias "EmmaSparkles"
    frame data/chars/MalMor/throw3.png
    delay 32
    bbox 70 91 34 59
    @cmd depost
    @cmd throw 8 3 -2.1 3 0 -1 #throw {damage} {type} {x} {y} {z} {facing}
    @cmd clearL
    frame data/chars/MalMor/throw3.png #Toss


anim follow3 #Bite thrice
    offset 90 148
    delay 32
    @cmd slamstart2
    @cmd position 0 22 31 0 -1
    frame data/chars/malmor/eat1.png
    @cmd position 1 22 31 0 -1
    frame data/chars/malmor/eat2.png
    @cmd hp 5
    @cmd hurt2 5
    sound data/sounds/phy_dmgbone_03.wav
    frame data/chars/malmor/eat1.png #One
    frame data/chars/malmor/eat2.png
    @cmd hp 5
    @cmd hurt2 5
    sound data/sounds/phy_dmgbone_03.wav
    frame data/chars/malmor/eat1.png #Two
    frame data/chars/malmor/eat2.png
    @cmd hp 5
    @cmd hurt2 5
    sound data/sounds/phy_dmgbone_03.wav
    frame data/chars/malmor/eat1.png #Three
    frame data/chars/malmor/eat2.png
    delay 2
    @cmd terminateAlias "EmmaSparkles"
    frame data/chars/MalMor/throw3.png
    delay 32
    bbox 70 91 34 59
    @cmd depost
    @cmd throw 8 3 -2.1 3 0 -1 #throw {damage} {type} {x} {y} {z} {facing}
    @cmd clearL
    frame data/chars/MalMor/throw3.png #Toss

Code:
anim fall4
    delay    2000
    offset    59 92
    frame    data/chars/Emma/Diamond/pain1.png # 0 Begin
    @cmd spawn01 "EmmaSparkles" 0 14 0
    frame    data/chars/Emma/Diamond/invis.png #Emma invisible

This is the code that shows her first frame of anim jump from the attachment which is supposed to not pose anim jump.
Code:
anim    jump
    delay    8
    offset    66 114
    bbox    43 52 29 56
    frame    data/chars/Emma/Diamond/jmp1.png
    @cmd    randSound "ting.wav" "null.wav" "null.wav"
    delay 5
    frame    data/chars/Emma/Diamond/jmp1-1.png
    frame    data/chars/Emma/Diamond/jmp1.png
        delay    10
    bbox    51 51 27 46
    frame    data/chars/Emma/Diamond/jmp2.png
        frame    data/chars/Emma/Diamond/jmp2.png
    delay    15
    bbox    48 52 21 67
    frame    data/chars/Emma/Diamond/jmp3.png
        frame    data/chars/Emma/Diamond/jmp3-3.png
 

Attachments

  • bor - 0079.png
    bor - 0079.png
    17.6 KB · Views: 3
It's hard to find the source of issue without seeing the scripts. So for now, I'm assuming you're using the same slamstart2 as mine.
This is the one used in Sailor Moon:
C:
void slamstart2()
{ // Slam/throw Starter for non-grabbing 
   void self = getlocalvar("self");
   void target = getentityproperty(self, "opponent");

   setentityvar(self, "Target", target);
   damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL3")); // Slam Starter
}

I can only assume that your version uses attack4 type instead.
As for why Emma is in her jumping sprite, you should check her text to see if she's using that sprite in other animation. It's possible that she's actually in other animation instead of JUMP.

How can I make one player not being grabbed by an enemy?

You can use antigrab for players but you must check antigrab before performing the slam/grab/throw and prepare failed/cant animation if the attempt fails.
 
I can only assume that your version uses attack4 type instead.
That's right. This is the slamstart2 function I use for fall4, which I forgot to show.

C:
void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL4")); // Slam Starter
   }
}

I originally used didhitscript which works well, but no matter how many times I tried with and without scripts, it only happens with Emma2.txt. Other players work fine in their own fall4 anim including Emma.txt. Emma2.txt is the only one I have an issue with.

As for why Emma is in her jumping sprite, you should check her text to see if she's using that sprite in other animation. It's possible that she's actually in other animation instead of JUMP.
You were right! I thought it was anim jump but I just came to realize that it's from anim walkoff. I have no idea why her anim walkoff starts playing every time she's grabbed in the first place before the real one starts. How can I not allow that anim walkoff to happen in her grab state?
 
I have no idea why her anim walkoff starts playing every time she's grabbed in the first place before the real one starts.

Well, I believe it's simply because she was walking before being grabbed then she's lifted above ground so WALKOFF animation is played. Though the real question is why she could be walking while being grabbed.

If I'm not mistaken Emma2 has high knockdowncount which prevents her from being knocked down. This is probably why she could be in WALKOFF animation despite being grabbed. To solve this issue, you'd need to reduce her knockdowncount and increase knockdown power in slamstart2 function.
 
If I'm not mistaken Emma2 has high knockdowncount which prevents her from being knocked down. This is probably why she could be in WALKOFF animation despite being grabbed. To solve this issue, you'd need to reduce her knockdowncount and increase knockdown power in slamstart2 function.
Where can I find that knockdowncount? Is it this one in red here?

void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);

if(target==NULL())
{
target = getentityproperty(self, "opponent");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL4")); // Slam Starter
}
}
 
Found it in the header. I've never used knockdowncount before. Read the manual about it, but I don't know what defense is used for, since I've never tried using it. I don't know how I can lower her value of knockdowncount but I put to 1 in knockdowncount and 999 in knockdown parameter from defense.

As for the knockdown power in slamstart2, I could increase to 2 or 999? Nice.

It's working now. Thank you very much, Bloodbane.

EDIT: I forgot about the antigrab thing for Armor2. Sorry. Should grabforce be used in conjunction with antigrab?
 
Last edited:
I'm having trouble with Armor2 when I made her knockout to over 999, while having the enemy's slamstart2 set with force value 999.

name Armor2
type none
health 150
defense all 0.5 60 1 20 20
defense freeze 0.0 1999 10
mpset 100 0 100 0
speed 6
shadow 0
noquake 1
weaploss 3
modelflag 7
height 63
running 8 4 2 1 0
atchain 1 2 3 4
makeinv 3
icon data/chars/Armor/Armor2/icon.png
knockdowncount 1999
diesound data/chars/Armor/die.wav
takedamagescript data/scripts/nostun.c
holdblock 1
cantgrab 1
antigrab 1
#grabforce 1
animationscript data/scripts/Script.c
onmoveascript data/scripts/jeblosA.c

I tried using anim cant, but it's not effective by being grabbed.
Code:
anim fall4
    delay    7
    offset    70 114
    bbox    48 61 22 55
    @cmd anichange "ANI_CANT"
    frame    data/chars/Armor/Armor2/jump1.png

Code:
anim    cant
    delay    7
    offset    70 114
    bbox    48 61 22 55
    frame    data/chars/Armor/Armor2/jump1.png

Instead, she's grabbed with a normal fall animation, which is anim fall.

Enemy's slamstart:
void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);

if(target==NULL())
{
target = getentityproperty(self, "opponent");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 999, openborconstant("ATK_NORMAL4")); // Slam Starter
}
}
I don't know what I'm doing with Armor2 being grabbed. I'm trying not to have her being grabbed by one enemy.

C:
anim attack2

    offset 90 148
    delay 11
    range -6 26
    followcond 2
    followanim 4
    attack 73 100 51 40 0 1 0 1 0 0
    hitfx data/sounds/null.wav
    bbox 69 98 38 55
    frame data/chars/malmor/stand1.png

C-like:
anim follow4
    offset 90 148
    delay 64
    @cmd slamstart2
    @cmd position 0 22 31 0 -1
    frame data/chars/malmor/eat1.png #Grab
    @cmd randAni openborconstant("ANI_FOLLOW1") openborconstant("ANI_FOLLOW2") openborconstant("ANI_FOLLOW3")
    frame data/chars/malmor/eat1.png #Grab
 
I'm trying not to have her being grabbed by one enemy.

You might need to modify slamstart2 to cancel slam and change animation if grabbed character has certain parameter, such as antigrab. It goes without saying that you'd need to check antigrab value before deciding to perform slam or not.
 
I always thought that antigrab's value was binary, is it not? Do I need to use its value like this for Armor2?

Code:
antigrab 999

If I have knockdowncount 1999 for Armor2 and 1 for Emma2 (character headers), which value for the KO force from slamstart2 should I change to? Should I change it to this (1999)?

void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);

if(target==NULL())
{
target = getentityproperty(self, "opponent");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1999, openborconstant("ATK_NORMAL4")); // Slam Starter
}
}

Emma2.txt:
name Emma2
type none
health 150
defense all 0.3 20 999 20 20
mpset 100 0 100 0
speed 6
shadow 0
noquake 1
weaploss 3
modelflag 7
height 64
running 8 4 2 1 0
atchain 1 2 3 4
makeinv 3
icon data/chars/Emma/Diamond/icon.png
knockdowncount 1
diesound data/chars/Emma/die.wav
alpha 1
holdblock 1
animationscript data/scripts/Script.c
onmoveascript data/scripts/jeblosA.c
takedamagescript data/chars/Emma/emmahit.c

Armor2:
name Armor2
type none
health 150
defense all 0.5 60 1 20 20
defense freeze 0.0 1999 10
mpset 100 0 100 0
speed 6
shadow 0
noquake 1
weaploss 3
modelflag 7
height 63
running 8 4 2 1 0
atchain 1 2 3 4
makeinv 3
icon data/chars/Armor/Armor2/icon.png
knockdowncount 1999
diesound data/chars/Armor/die.wav
takedamagescript data/scripts/nostun.c
holdblock 1
cantgrab 1
antigrab 1
#grabforce 1
animationscript data/scripts/Script.c
onmoveascript data/scripts/jeblosA.c

Let's recap this (maybe):
1. Emma2 has her knockdowncount to 1, along with knockdown 999 parameter from defense. It's just for the enemy to grab. That's solved.
2. Armor2 should be ungrabbed if the enemy attempts to grab her as an attack.
3. The enemy has 999 (or 1999?) as a KO force to grab his specific target. One can be grabbed. The other one cannot. The one that can't be grabbed should not play a fall animation for being grabbed or the enemy is unable to grab her.

Still lost on the antigrab and the knockdowncount values for the enemy's force of attack for slamstart2.
 
antigrab was never binary as it's the opposite of grabforce so set any value you want.
Like I've posted above, if you don't want Armor2 or any entity to be grabbed, you'd need to modify slamstart2 to change animation if to-be-grabbed opponent has antigrab higher than certain limit.
Unlike regular grabbing mechanic, slamstart2 won't prevent entity from running the next declared function (which is position) if damageentity function knocks down or not. The best way is to change animation if to-be-grabbed opponent can't be grabbed.
 
I tried changing animation within that specified fall animation for the Armor2, but somehow, she's still grabbable. I'm quite lost with antigrab and knockdowncount values in regard to both grabbed and ungrabbed.

Code:
anim fall4
    delay    7
    offset    62 101
    @cmd attack0 "ANI_FOLLOW1"
    frame    data/chars/Armor/Armor2/jump1.png
    #@cmd attack0 "ANI_FOLLOW1"
    frame    data/chars/Armor/Armor2/jump1.png
    #@cmd attack0 "ANI_FOLLOW1"
    frame    data/chars/Armor/Armor2/jump1.png

Code:
anim follow1
    delay    1000
    offset    70 114
    landframe 1
    frame    data/chars/Armor/Armor2/jump1.png
    delay 5
    #@cmd attack0 "ANI_JUMPLAND"
    frame    data/chars/Armor/Armor2/jump1.png

When I change it to a follow animation from fall4, she just plays that animation without getting dropped from the grabber. Or did I miss something? Should I change the frame of the target?


Ungrabbed weapon player (e.g. Armor2):
- antigrab: 999
- knockdowncount: 999
- defense all 0.5 60 1 20 20
- defense freeze 0.0 999 10

Grabbed weapon player (e.g. Emma2):
- antigrab: 1999
- knockdowncount: 1999
- defense all 0.3 20 1999 20 20

Enemy:
- defense all 1 16
- defense normal7 1
- cantgrab 1

I'm sorry, Bloodbane. I'm totally confused about the use of nonknockcount, defense, and antigrab. I know antigrab is never binary as you said. It's just that when I tried setting these for the ungrabbed, she's still grabbed. Need to make one certain weapon model ungrabbed while the player-type one gets grabbed.

Like I've posted above, if you don't want Armor2 or any entity to be grabbed, you'd need to modify slamstart2 to change animation if to-be-grabbed opponent has antigrab higher than certain limit.
Unlike regular grabbing mechanic, slamstart2 won't prevent entity from running the next declared function (which is position) if damageentity function knocks down or not. The best way is to change animation if to-be-grabbed opponent can't be grabbed.
I really don't know how I can change the animation for slamstart2 as I have this for the enemy type.

C:
void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, 1200, openborconstant("ATK_NORMAL4")); // Slam Starter
   }
}


Should I use that kind that you provided for it to work?

C:
void slamstart2()
{ // Slam/throw Starter for non-grabbing
   void self = getlocalvar("self");
   void target = getentityproperty(self, "opponent");

   setentityvar(self, "Target", target);
   damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL4")); // Slam Starter
}
 
Back
Top Bottom