How do I get enemy to capture player.

Just started using Construct 2? Post your questions here

Post » Fri Mar 14, 2014 7:48 pm

I made a track game for my daughter and I am learning more and more as I mess around with C2 but I still have a lot of learning to do. I have it where my player is chased by an enemy around a race track that has power ups. As I go around the track the enemy gets close to me but won't ever catch me. It seems to be just trailing me. I will try to upload the game. Don't know if I exactly know how but will try.

What I need to know is why won't it catch me instead of just follow me.
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 6
Reputation: 239

Post » Sat Mar 15, 2014 8:32 am

You had a line of sight behavior on the enemy but no event to use it. So I added an event for when the enemy can see the player the enemy will move at an angle towards the player. You can play with the number of pixels the enemy moves in the action to get a speed that you like.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Sat Mar 15, 2014 8:59 am

Here is an example where I integrated a waypoint system into your game.

doesnt have a finish system or anything, but from the example I am guessing you should be able to make something out of it :)
You do not have the required permissions to view the files attached to this post.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Sat Mar 15, 2014 12:56 pm

@shirokum - Thank you I will mess around with the numbers and see what I come up with.

@lennaert - At this point I only have the free version. It won't let me open the version you downloaded. I plan to buy the license but right now can't because was hurt at work about a month ago and workers comp checks have not come yet. I don't know if there is a way to save it in an older version. It says I have r163 and you have r164 if that helps. I do thank you very much for taking the time to help me.

I found construct 2 because I wanted to fill my day with something to do while off work hurt and my daughter likes the idea that I can make something for her to play.
B
3
Posts: 6
Reputation: 239

Post » Sat Mar 15, 2014 2:30 pm

Ohw, I used the latest beta version, its downloadable.

I did not use any licensed features.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Sun Mar 16, 2014 2:01 pm

thank you. I downloaded latest version. I can open it now, I will look and see what I can do with the example that you provided. it looks like you placed a predetermined path for the enemy sprite instead of a pathfinding to the sprite if I am looking at it correct?
B
3
Posts: 6
Reputation: 239

Post » Sun Mar 16, 2014 4:22 pm

Yes indeed, that method will allow an enemy player to be quicker too if the player plays really bad.

:)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest