Flying enemies

0 favourites
  • 6 posts
From the Asset Store
Vector illustration of three flying saucers applied to games, websites, applications, covers, and many others!
  • Trying to make a flying enemy. I cannot figure out how to though. I have on the Global attack range so when I get close he'll attack me, but not happening. Also How can I get him to go up and down as a platform enemy would go left and right while patrolling?

  • If you mean floating up and down in a wave motion? If so have his Y coordinate add a multiple of the 'sine' wave.

    With enemies I would usually have a variable such as 'InRange'. Default set to '0'. Once the player gets within range of the enemy, the 'InRange' variable is set to '1'. If the 'InRange' variable is set to '1', then the enemy angles towards the player and begins shooting etc...

    InRange = 0 Would therefore be in a passible mode

    InRange = 1 Would therefore be in an aggressive attacking mode.

    If the Global Attack range is not working. Instead either use a sprite as a hitbox (Big circule), so that when the player collides with it InRange is set to '1'. Alternatively have an event which checks the players distance such as the expression "distance(x1, y1, x2, y2)", if this number returns too low, then have InRange set to 1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm thankful for your help, but I don't quite understand how I would put that in. Can you tell me in simpler terms.

    Example: "Player > On Collision With > Platform"

    I do appreciate it, but I just need broken down a bit more. I'm still very new to this.

  • what hes sayin is every tick check the distance from the players location to the enemy location and if its less than however close you want it to be before the enemy reacts then make it react

  • how do you make the player fly?

  • Uhhhh, you give him the eight direction movment behavior or the car movement behavior. (I reccomend the eight direction one, works way better)

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