Enemies to roam in an area

Get help using Construct 2

Post » Mon Feb 24, 2014 8:29 pm

I'm new to Construct 2 and have looked around but can't find an exact answer I am looking for.

I want the enemies to roam around on the layout randomly on a top down viewed game. Is there anyway to do that?
B
10
S
4
Posts: 56
Reputation: 919

Post » Mon Feb 24, 2014 8:42 pm

Similar to how you would do it in the platformer begginers example, but instead of having invisible blocks that just turn them left and right you add other options, up, down, etc...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Mon Feb 24, 2014 9:11 pm

Thanks. I got them to stay inside but how do I make them roam randomly?
The enemies seem to follow a certain pattern right now.
B
10
S
4
Posts: 56
Reputation: 919

Post » Mon Feb 24, 2014 11:49 pm

You can update your logic to say when they collide with it pick a random number between 1-4 and send them in a direction based on the number. Or if they have other things they can do besides just move in directions you can have them do other things as well, jump, attack, fall asleep, etc...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests