How can I stop this?

Get help using Construct 2

Post » Wed Jan 08, 2014 11:08 pm

I have my enemy set to bullet and line of sight. So when that spawn they're set to my X,Y while shooting. However when the enemy and the player overlap the enemy spins in the wild circle underneath the player. I've tried disabling collision,LOS, on overlap, on collision. Nothing seams to work.

If I'm not moving and the enemy moves under me (On a separate layer) they all will do this until I cam pull away to get enough space to shoot them.

See here for yourself if you want

What I would like is for all he enemies to stop just short of the player if idle and then continue to follow if moving.

Thank you in advance for your helpALLMarkMade2014-01-08 23:09:24
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
32
S
15
G
3
Posts: 356
Reputation: 5,269

Post » Wed Jan 08, 2014 11:23 pm

One way to do it:

for each enemy
system compare two values: distance(enemy.x, enemy.y, player.x, player.y)<50
- enemy set speed to 0
system compare two values: distance(enemy.x, enemy.y, player.x, player.y)>50
- enemy set speed to 10

ofcourse you should play with the values

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jan 09, 2014 12:31 am

@LittleStain Thank you I will try it. That sounds like a good idea.
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
32
S
15
G
3
Posts: 356
Reputation: 5,269


Return to How do I....?

Who is online

Users browsing this forum: NN81, TsubaRu and 9 guests