Make enemy move towards player

Get help using Construct 2

Post » Sun Nov 13, 2011 1:03 pm

I'm a noob but I thought this would be simple to do, guess I was wrong
I tried it with this:

but then the enemy only moves towards my player when he's on the right of him, when he's on the left he doesn't move..what am I doing wrong?

.CAPXjimjim19832011-11-13 13:04:35
B
8
S
2
G
4
Posts: 16
Reputation: 2,453

Post » Sun Nov 13, 2011 3:32 pm

http://dl.dropbox.com/u/5214903/GM/First%20gamezombieFix.zip
B
43
S
9
G
5
Posts: 231
Reputation: 7,291

Post » Sun Nov 13, 2011 5:16 pm

[QUOTE=Miu3] http://dl.dropbox.com/u/5214903/GM/First%20gamezombieFix.zip[/QUOTE] Thanks alot! I see what I did wrong.
But now I have the problem that the zombie goes crazy (going from left to right) when I'm above it.

I thought I'd fix it by showing the freshly made LookUp animation when the player's X axis is equal and the Y axis is higher than the zombie's:

why doesn't this work?

CAPXjimjim19832011-11-13 17:17:27
B
8
S
2
G
4
Posts: 16
Reputation: 2,453

Post » Sun Nov 13, 2011 7:31 pm

[QUOTE=jimjim1983] [QUOTE=Miu3] http://dl.dropbox.com/u/5214903/GM/First%20gamezombieFix.zip[/QUOTE] Thanks alot! I see what I did wrong.
But now I have the problem that the zombie goes crazy (going from left to right) when I'm above it.

I thought I'd fix it by showing the freshly made LookUp animation when the player's X axis is equal and the Y axis is higher than the zombie's:

why doesn't this work?

CAPX[/QUOTE]


I myself had trouble figuring that issue when trying to do first game in C2 and this is main reason why I dont like using comparing distances much. One of the solutions i came up with migh be good enough for what you can try to do.
http://dl.dropbox.com/u/5214903/GM/First%20game%20ZombieLookUP.zip
B
43
S
9
G
5
Posts: 231
Reputation: 7,291

Post » Sun Nov 13, 2011 8:43 pm

[QUOTE=Miu3] [QUOTE=jimjim1983] [QUOTE=Miu3] http://dl.dropbox.com/u/5214903/GM/First%20gamezombieFix.zip[/QUOTE] Thanks alot! I see what I did wrong.
But now I have the problem that the zombie goes crazy (going from left to right) when I'm above it.

I thought I'd fix it by showing the freshly made LookUp animation when the player's X axis is equal and the Y axis is higher than the zombie's:

why doesn't this work?

CAPX[/QUOTE]


I myself had trouble figuring that issue when trying to do first game in C2 and this is main reason why I dont like using comparing distances much. One of the solutions i came up with migh be good enough for what you can try to do.
http://dl.dropbox.com/u/5214903/GM/First%20game%20ZombieLookUP.zip[/QUOTE] very inventive, thanks!
Do you also happen to know how I can shoot to the left?
B
8
S
2
G
4
Posts: 16
Reputation: 2,453

Post » Sun Nov 13, 2011 9:23 pm

You should check this topic out.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Nov 13, 2011 10:12 pm

[QUOTE=Kyatric] You should check this topic out.[/QUOTE] I did, but I get a 404 when I try to download the file.
B
8
S
2
G
4
Posts: 16
Reputation: 2,453

Post » Mon Nov 14, 2011 1:14 am

Indeed.
Here's a commented capx.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Nov 14, 2011 9:07 am

[QUOTE=Kyatric] Indeed.
Here's a commented capx.[/QUOTE] thanks!
B
8
S
2
G
4
Posts: 16
Reputation: 2,453

Post » Fri Jan 04, 2013 8:10 pm

[QUOTE=Kyatric] Indeed.
Here's a http://dl.dropbox.com/u/36472942/construct/forumhelp/enemy_patrolling_shooting.capx.[/QUOTE]

Thanks a lot for this! Just started playing with Construct and it's nice to see how to organize things. :)
B
8
Posts: 3
Reputation: 932

Next

Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 7 guests