How do I swallow my enemies and spit them back out?

0 favourites
  • 2 posts
From the Asset Store
Helping streamers give their viewers more excitement.
  • Hey guys, new to this.

    I'm using Construct 2 for my final project at school.

    If I don't get this battle mechanic down I'm screwed.

    I have the art down, and animations. Here's a little piece.

    Guy is supposed to suck an enemy (wow) and either assimilate him into health or spit him out like a projectile.

    I want to start with the projectile.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Swallowing - you can do it with animation, create a sequence of frames where the enemy is getting smaller. Run this animation and move enemy towards the player with bullet behavior. At the end of animation, destroy the enemy.

    Or use Sine behavior to change scale.

    Or you can do something like this:

    For x=1 to 10
        Wait loopindex*0.1
        enemy Set Scale to (1-loopindex/10)
        enemy Move at angle (angle(enemy.x, enemy.y, player.x, player.y)) distance (10)
    It's just a random example, you may need different values for wait, distance etc.
    Spitting - you can simply create a smaller clone of enemy sprite, add Bullet behavior and shoot it as any other bullet. 
    (see Shooter sample projects in C2)
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)