Flying Enemy: Advice & Ideas

0 favourites
  • 4 posts
From the Asset Store
Flying Easter
$2.80 USD
60% off
Full game Construct 2 and Construct 3 to post on Google Play
  • Hey All,

    While working on my game, I've created a "test room" with a simple walking (platform) enemy.

    It's simple, easy and fun to test the Player vs Enemy as a basic part of the game-engine.

    Now I'm wondering about a different kind of enemy, a flying one.

    The basic idea for this enemy is to fly around, and when "see" the Player, attacking him from above.

    So it's like an eagle or a bat in a way.

    When the Flying Enemy will attack the Player, either if he's missing or Hit, it should get back to it's "default" flying height.

    I want this creature to avoid interacting with the floor of the room, so it won't touch the floor or get too near to the floor.

    I'm thinking about starting with a bullet + curve? but I'm not sure.

    So I would love to hear your ideas about how should I approach it.

    Please consider that I'm a newbie in C3 and in programing in general, so I hope you can explain in a visual or simple as possible way, it will be very helpful and appreciated.

    Sorry about my bad English and thanks ahead! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't figure out how to post a pic, I will try my best to keep this simple.

    Set up a condition that tell the flyer to attack player, then us an action "set the angle of motion" (bullet behavior) towards position of "Player.X", "Player.Y"

    You will then need a condition to disengage the player, at that point you could simply angle the flying object to something like 40degrees until it reaches a certain height, then set it to 0degrees.

  • Thanks for the advice,

    I'll try to start messing with it (I just found few bugs I need to fix before I add the enemy hehe).

    Until Scirra will fix the shortcut icon to a correct one, to post an image on the new forums try this:

  • On line 82 is where I have the actual dive action, I'm using custom movement but the bullet with "set angle of motion" should work just fine.

    On lines 83 and 84 I set an instance variable to store the angle of flight I want the flyer to go after the dive is over, the "FlyAway" Instance variable is then used on line 86.

    Note: You will most likely need to mirror your sprite.

    General Tip: I noticed that lines 79&80 can be combined by right clicking on the condition box and changing it to an "Or Block", This Event Sheet is from an open project of mine, it's not yet optimized.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)