The template now supports simple grab mechanics between enemies and player. An enemy grab renders the player useless temporarily and performs periodic attacks.
To define an enemy grab 3 animations are needed :
(GrabInto is optional, the enemy can go directly to GrabLoop)
A new grab ActorState needs to be added to the enemy state list. This state has to be of class EnemyStateGrab and reference the GrabInto animation state (AnimState_Enemy_Grab in the image below).
These state class defines many attributes of the grab as show below:
The most important are:
Grab Tag: Helps finding which player state will be selected. This is the “grabbed” player state. (see below)
Min/MaxAngleOfEntry: Angle between player/enemy in which this grab can be used
Remember to exclude grabbing from Hurt list and assign custom hurt anim on the Character
Grab Positioning: Determines how grabbed and grabber are moved relative to each other to match the animation.