Grab Distance and Grabin Question

machok

Well-known member
What is the difference between these two? I'm asking about character-enemy distance grab, not anything else
I've always used grabdistance but is there any additional effect I should know about the grabin feature?

Initially my grab offset animation was fixed but after a while i feel dissatisfied then I change to grabdistance 26 (default 36)
so I had to change the offset on my anim grab but in some circumstances this new offset grab does not apply. Enemy is already in a grabbed state but the offset still looks very far away
Can grabin help? so that this grabdistance is more consistent? 

Code:
grabdistance {int}

    {int} determines many things:
    How close this entity must be to another to grab it.
    How far away this entity will stand while holding an enemy.
    How deep this character's attack range is in z axis. This is overriden by 'rangez' and 'attack' (see below).
    The default value is 36.

Code:
grabin {type} {distance}

    If this command is declared, next nonknockdown attackbox makes entity grab opponent in same manor as normal grab.
        0 = no effect (used to turn off grabin)
        1 = Opponent is pulled in while this entity doesn't move
        2 = Both entity and opponent are pulled each other splitting the distance
    {distance} controls how far entity and opponent would be when grabbing starts.
    Use this command with non knockdown attackbox of course.


 
Grabdistance is the maximum distance (offset to offset) where the entity will initiate a grab against another entity. By default it also controls a lot of other things it really shouldn't because of legacy compatability. Fortunately you can override all the other stuff with settings elsewhere.

Grabin has nothing to do with grabbing at all. It's an attack property that moves the target entity toward attacker on hit, and that's it. It does not initiate a grab on its own.

HTH,
DC
 
Damon Caskey said:
Grabin has nothing to do with grabbing at all. It's an attack property that moves the target entity toward attacker on hit, and that's it. It does not initiate a grab on its own.
Thanks DC for the explain I tried grabin feature on attack anim now I know what's this for

1. Is there any feature like grabin but for anim grab? because I want the enemy will be pulled in front of player on the same z line when they're in grabbed state
2. If I want the enemy to be immediately grabbed every time the player passes them (eg from top to bottom or vice versa not front) what settings should i use?
  grabdistance or grabforce doesn't seem to have much effect
 
1. Is there any feature like grabin but for anim grab? because I want the enemy will be pulled in front of player on the same z line when they're in grabbed state

That's already the default behavior, so I'm not really sure what you're asking for.

If I want the enemy to be immediately grabbed every time the player passes them (eg from top to bottom or vice versa not front) what settings should i use?
  grabdistance or grabforce doesn't seem to have much effect

Again, this is already how the engine behaves by default, so I'm confused what you are asking for.

DC
 
Damon Caskey said:
Again, this is already how the engine behaves by default, so I'm confused what you are asking for.
I am sorry for confusing (it's my bad English). Yes I know this is the engine by default
it just under certain circumstances this doesn't always happen.

1. I want to stay in a straight blue line to avoid fire traps

  but if player grabs an enemy that is slightly less aligned then the player will be drawn to the enemy line, what I want is the opposite



2. When enemy is thrown and they rises player will be able to grab it immediately, yes this is done by the engine but the problem is when they get thrown against the wall (right next to the wall) and then rises somehow it becomes difficult to grab them.
 
machok

OK, now I understand the issue. Unfortunately, both of these would require some scripting to fix.

1. I want to stay in a straight blue line to avoid fire traps

  but if player grabs an enemy that is slightly less aligned then the player will be drawn to the enemy line, what I want is the opposite

The native engine grab is hard coded to split the difference in distance when you grab an entity. In other words, if you are at Z20 and target is at Z40, you both move to Z30 on grab. There's no way to turn this off.

2. When enemy is thrown and they rises player will be able to grab it immediately, yes this is done by the engine but the problem is when they get thrown against the wall (right next to the wall) and then rises somehow it becomes difficult to grab them.

This is because the native grab does not activate exactly like Final Fight or Streets of Rage. In those games, grabs are triggered by the walking action, even if you are blocked by a wall. In OpenBOR, you must actually be moving on the X or Z plane.

Before I explain the script you'll need to work around these traits, I'll warn you it's a bit involved, so you need to decide if it's worth bothering with first.

DC
 
Damon Caskey said:
Before I explain the script you'll need to work around these traits, I'll warn you it's a bit involved, so you need to decide if it's worth bothering with first.
It's not that I avoiding scripts but usually all I do is copy paste and a little edit so if the script is a bit complicated, I'll try to find another way.
point 1 I can reduce z range on burn, It may not be as accurate as the original but this way is easier.
point 2 doesn't seem like a game breaking so for now I let it go

Damon Caskey said:
The native engine grab is hard coded to split the difference in distance when you grab an entity. In other words, if you are at Z20 and target is at Z40, you both move to Z30 on grab. There's no way to turn this off.
In those games, grabs are triggered by the walking action, even if you are blocked by a wall. In OpenBOR, you must actually be moving on the X or Z plane
Ahh I see..  thank you so much DC for Explanation now I can finally understand the cause.
 
Back
Top Bottom