cantgrab not working

Aerisetta

Active member
can anyone help me take a look why the worg.txt enemy CAN be grabbed? I dont want it to be grabbed. i tested it for over an hour and it keeps not working

I tried
cantgrab 1
notgrab 1

Here's the grab

Code:
anim    freespecial12 ##grab attempt
    delay    1
    offense normal1 -1
    offset    800 650
    followcond 3
    followanim 8
    attackone 1
    fastattack    1
    jugglecost    1
    offset    800 650
    bbox    750 350 100 300
        @cmd    target 3 3 1 1 2
        @cmd    dash
    frame    data/chars/aerisetta/grab01.png
    #@cmd    consume 50 0 "ANI_CANT"
    sound    data/sounds/fast.wav
    sound    data/sounds/punch_.wav
    delay    20
    frame    data/chars/aerisetta/grab01.png
    @cmd    dasher 0.1 0 0 1
    delay    6
    frame    data/chars/aerisetta/grab02.png
    attack5 800 350 125 300 0 0 0 0 5 50
    sound    data/sounds/Run.wav
    forcedirection -1
    frame    data/chars/aerisetta/grab03.png
    attack    0
    delay    10
    frame    data/chars/aerisetta/grab04.png   
    sound    data/sounds/A_Pain2.wav
    delay    20
    frame    data/chars/aerisetta/grab04.png   

anim    follow8 ##grab successful
    offset    800 650
    delay    2
    sound    data/sounds/grab.wav   
    frame    data/chars/aerisetta/grab03.png
    move    5
    frame    data/chars/aerisetta/grab03.png
    move    -5
    frame    data/chars/aerisetta/grab03.png
    move    4
    frame    data/chars/aerisetta/grab03.png
    move    -4
    frame    data/chars/aerisetta/grab03.png
    move    3
    frame    data/chars/aerisetta/grab03.png
    move    -3
    frame    data/chars/aerisetta/grab03.png
    move    2
    frame    data/chars/aerisetta/grab03.png
    move    -1
    @cmd test_dograb
    delay    50
    frame    data/chars/aerisetta/grabwalk01.png
 

Attachments

so maybe try this one:

My (limited health) belger can't be grabbed using that script
Code:
name       belger2
score      100000
health      84
speed       15
type       none
subtype    notgrab
shadow     0
noquake    1
nodieblink 2
risetime   300
death      1
bounce     1
weaploss   3
modelflag  7
subject_to_screen 1
cantgrab   1
 
so maybe try this one:

My (limited health) belger can't be grabbed using that script
Code:
name       belger2
score      100000
health      84
speed       15
type       none
subtype    notgrab
shadow     0
noquake    1
nodieblink 2
risetime   300
death      1
bounce     1
weaploss   3
modelflag  7
subject_to_screen 1
cantgrab   1
Thanks!

It worked...a bit unfortunate that I need to use a script to do what should be native by default, but hey it works
 
I've tested it and the scripted grab quoted in first post above could bypass cantgrab setting. My suggestion is to add opponent check in FOLLOW8 to cancel into other animation (grab fail animation or something). The check will check opponent's antigrab setting, if it exceeds certain value cancel to other animation.
BTW antigrab is alternate way to make an entity ungrabbable. Set something like antigrab 100 in Worg's header text to make Worg ungrabbable.

Here's my suggested script:
C:
anim    follow8 ##grab successful
@script
  if(frame==1){
    void self = getlocalvar("self");
    void opp = getentityproperty(self,"opponent");

    if(opp){
      int AG = getentityproperty(opp,"antigrab");

      if(AG >= 100){ // antigrab more than 100 aka ungrabbable?
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW10")); // change into grab fail/cancel animation
      }
    }
  }
@end_script
    offset    800 650
    delay    2
    sound    data/sounds/grab.wav   
    frame    data/chars/aerisetta/grab03.png
    move    5
    frame    data/chars/aerisetta/grab03.png
...
 
Last edited:
It worked...a bit unfortunate that I need to use a script to do what should be native by default
@Aerisetta

The native notgrab/cantgrab works with the native grab, the one that works when you walk toward an opponent in order to grab him.
I don't know exactly the content of your @cmd test_dograb script, but usually scripted grabs like the slamstart2 and yours ignores notgrab/cantgrab because they use the last damaged opponent as reference, not the current entity natively grabbed.
In other words, your grab starts when you hit a target, not when you walk toward him, in which is not a native way.
1691172493849.png

The @Bloodbane script is a smart solution for this case.
 
Back
Top Bottom