Does anyone have a basic routine for the patrol enemy behavior of a platform game?

0 favourites
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Hi guys!

    Does anyone have a project file (C2/C3) for a basic routine for the patrol enemy behavior of a typical platform game?

    The kind that walks around autonomously, always turning back when it comes across the edge of a platform.

    Thank you for your attention and collaboration as always!

  • Do you mean a patrolling enemy that changes direction when it reaches the platform edge? You can put invisible sprites at the end of the platform, when it touches one of them toggle a boolean that relates to simulating left/right on the enemy platform behaviour.

  • Take a look at the Kiwi Story game in the examples, it has an enemy with this patrolling behaviour.

  • Take a look at the Kiwi Story game in the examples, it has an enemy with this patrolling behaviour.

    I don't have a C3 license, so I can't fully access the project. :(

  • Do you mean a patrolling enemy that changes direction when it reaches the platform edge? You can put invisible sprites at the end of the platform, when it touches one of them toggle a boolean that relates to simulating left/right on the enemy platform behaviour.

    I would like a solution that does not require a physical barrier, that works in a more universal and adaptable way. There will not always be a wall in front of the enemy. Sometimes there will be a precipice.

  • > Do you mean a patrolling enemy that changes direction when it reaches the platform edge? You can put invisible sprites at the end of the platform, when it touches one of them toggle a boolean that relates to simulating left/right on the enemy platform behaviour.

    I would like a solution that does not require a physical barrier, that works in a more universal and adaptable way. There will not always be a wall in front of the enemy. Sometimes there will be a precipice.

    So that works then, you place the invisible sprite wherever you want.

  • I kindly ask again: does anyone here have a short example, CAPX or C3, of a basic functional behavior of an enemy with patrol behavior for a 2D platform game?

    I really need it urgently, amidst a thousand demands for an educational game with a very small team. :(

  • Detect "holes" in the floor with a raycast.

    wackytoaster.at/parachute/enemyturnaround.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Detect "holes" in the floor with a raycast.

    https://wackytoaster.at/parachute/enemyturnaround.c3p

    Thank you very much! :D

  • Detect "holes" in the floor with a raycast.

    https://wackytoaster.at/parachute/enemyturnaround.c3p

    Construct 2 doesn't have these Line of Sight parameters. :(

    Do you know what the alternative would be in C2 to replace them?

  • The platforms in your game, are they tiles? Or are they sprites?

  • The platforms in your game, are they tiles? Or are they sprites?

    I use both, but most of the enemies are on sprite platforms.

  • > Detect "holes" in the floor with a raycast.

    > wackytoaster.at/parachute/enemyturnaround.c3p

    Construct 2 doesn't have these Line of Sight parameters. :(

    Do you know what the alternative would be in C2 to replace them?

    You can sort of replace raycasts with sprites and just check "is overlapping ground"

  • Check it: fileport.io/pMSy9NrXcaqm

    Thanks! But what about using Sprites as platforms?

  • > > Detect "holes" in the floor with a raycast.

    > > wackytoaster.at/parachute/enemyturnaround.c3p

    >

    > Construct 2 doesn't have these Line of Sight parameters. :(

    >

    > Do you know what the alternative would be in C2 to replace them?

    You can sort of replace raycasts with sprites and just check "is overlapping ground"

    Okay, but how do I do that? :)

Jump to:
Order by:
Duplicate Topics
Posts
Views
Last Post
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)