Help With Retro Enemy Behavior (move along solids)

Get help using Construct 2

Post » Wed Oct 30, 2013 5:32 pm

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
B
74
S
19
G
9
Posts: 377
Reputation: 9,258

Post » Tue Nov 12, 2013 4:58 am

:(
B
74
S
19
G
9
Posts: 377
Reputation: 9,258

Post » Tue Nov 12, 2013 7:27 am

I didn't address point number one but here is a possible solution to number 2:
/examples19/wall_crawl3.capx
https://www.dropbox.com/s/dlsu2ouuih9yv ... .capx?dl=1

Some more tinkering may be needed to perfect it.
Last edited by R0J0hound on Tue Aug 01, 2017 9:11 pm, edited 1 time in total.
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Post » Sun Nov 17, 2013 3:50 am

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.
B
74
S
19
G
9
Posts: 377
Reputation: 9,258

Post » Sun Nov 17, 2013 5:37 am

http://www.scirra.com/forum/metroid-zoomer-stick-crawl-2-wall-movement-example_topic73294.html
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Nov 17, 2013 4:11 pm

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.
B
74
S
19
G
9
Posts: 377
Reputation: 9,258


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests