Grab, throw, or pounce

below is a little example which should get you started on the type of things needed. I omitted the animations and the anim notifies that you would use but this is the overall idea of the logic needed.

for the example i went with a grab and throw, and separated the task into 3 steps, Move to player, Grab Player, and Throw Player.

For movement (chase) i simply used a ai move to and if successful then we grab, if not we chase again.

For the grab we first do a check to see are we out of range (100uu) of the player, if true we go back to chasing, if false we attach to actor (player to this enemy), we disable the player movement, delay, then call the throw event. The pickup animation would would occur before the attach to and you could use a anim notify to run the rest of this script. The delay would be where your enemy walks the player to a ledge or something.

For the throw event we first reverse what we did in the last event by detaching the actor and enabling player movement. Then we launch the character. The velocity of the launch in this case is decided by the direction the enemy is facing, then we modify that value (vector + Vector) to give more upward direction, and finally we scale the vector as needed (throw force). The last thing i did was to delay so the enemy can admire his throwing skill and decide what to do next… chase so he can throw again of course.

3 Likes