Help With Retro Enemy Behavior (move along solids)

0 favourites
  • 9 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello Construct Community!

    I've been haunting these forums for a while and have been able to glean much useful information. I used to pour a lot of time into Multi Media Fusion back in the day, along with Click and Create and, before that, Klik n Play (SP?) and I've been pumped on Construct for a little while. However, I've finally endeavored to jump back in and actually make something a bit more worthwhile (albeit on on my spare time). At any rate, thank you everyone for making this a thriving community with honest participation, encouragement, and correction. The internet can be a dark place.

    On to my question - I'm working on a bit of a retro throwback type game, similar to the original Legend of Zelda in many ways. I've nailed down the movement engine and some basic behaviors, but I'm wanting to test some enemy behaviors now. I was curious as to how to create an enemy that does the following:

    1. finds the nearest solid object

    2. moves along the solid object until it hits the edge and turns, or keeps moving along the next solid object

    An example would be the zoomer from the original metroid - you can do a youtube search for "Metroid Wiki-Zoomers In Action" and see an example of this behavior. (the same movement as the "spark" enemies found in Link's Awakening - just couldn't find a good video of just them)

    I had thought from the pathfinder description that it was possible to use that behavior, but I haven't found an adequate example as of yet. I would appreciate anything anyone is able to do to point me in the right direction. Thanks everyone!

    Thanks everyone! I'm betting the answer is pretty really simple.. haha

  • :(

  • I didn't address point number one but here is a possible solution to number 2:

    /examples19/wall_crawl3.capx ... .capx?dl=1

    Some more tinkering may be needed to perfect it.

  • This is exactly what I needed... thanks so much! I was starting to think about detectors, too. I really appreciate how efficiently you did this with such few events.

  • Thanks! I think R0J0hound's example is a bit more simple and applicable to what I'm hoping to accomplish, but I did come across that example. Would work great for a platformer, considering the platform physics are utilized.

  • I didn't address point number one but here is a possible solution to number 2:

    /examples19/wall_crawl3.capx ... .capx?dl=1

    Some more tinkering may be needed to perfect it.

    Apologies for bumping an old thread. I was looking for something like this, so thanks for the example. But perhaps someone can help me with a small problem and that is that I can't seem to figure out how I can apply this to an enemy that is moving to the left. Anyone has any tips?

    I tried changing the more forward to a negative number,seemed like an obvious the first step. But this means you need to change placement of the corner, front and right detectors. I assume I need to change the angle or the placement and also change the way it rotates? I have been trying to figure this out, the way the angle changes is sorta making my head hurt <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

  • scaffa

    I did something similar for another post:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • scaffa

    I did something similar for another post:

    Ah cool! Thanks for your reply and the help. Will look at it later tonight.

    Ofcourse just a few minutes after posting my question I might have figured out how to adjust the capx from R0J0hound to make it work in the opposite direction.

    Again thanks! Appreciate it

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