How do I make my Boss AI ?

0 favourites
  • 7 posts
From the Asset Store
Endlevel boss, brainwave animation, projectiles, ...
  • Hello guys !

    So, I'm making a platformer game and I'm in the first boss level.

    I want when the player is next to the Boss, this last move away and shoots when he's away.

    Sometimes, the Boss come next to the Player for draining his life.

    At 50% of his life, the rythm speeds up.

    The little problem is : How can I "program" it ?

    Please help me with some details !

    I'm stucked in this for about 4 months.

  • You just have to code things step by step.

    If you want the ai to do things at certain times give him modes

    So mode 1: move towards enemy. If im too close, set mode to 2?

    Mode 2: move away from enemy.

    If ai at certain distance { shoot shot function}

    If at another distance { swing axe function}

    And have a variable on the ai for time for attacks, so if timer1 <= 0 do special life drain attack

    on life drain attack set timer to #

    then just speed him up, or reduce timers.

  • When I said "this last", I meant the boss and... modes ? What and where are those ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm new to construct 2 and still figuring this out myself but...

    modes could be done via instance variables, the trick is to set what changes the instance variable, it could be random or triggered by x position...

  • If you want the boss to have certain actions under certain conditions, you have to create those conditions and attach the actions..

    It's like programming anything else..

    First decide what you want the boss to do..

    then decide when he should do itband when not..

    then create the events/conditions based on that..

    let's for example say your boss has an attack he only performs when the player is within 100 to 200 pixels to the left of the boss

    system is between values : player.x (is between) boss.x-200 (and) boss.x-100

    boss play attack

  • I did the shooting and the draining(only when I go next to him), I need the moves and the "Sometimes, the Boss come next to the Player for draining his life"

    Please help me !

  • When should the boss move?

    When should the sometimes be?

    What are the conditions for those actions?

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