How to make object run from the player?

Get help using Construct 2

Post » Wed Feb 20, 2013 11:05 am

Hello,
im new to the Construct, fresh off basic game tutorial and I want something really basic on my own. At least I think this could be basic, but hey, what do I know about making games?!

anyhow, I checked tutorials on site and forums and didnt find tips that could help me so maybe you could point me to the place, where someone has already talked about it (im sure someone has).

The problem:

I want to make game where player must catch dog, and dog is always running away from him. Player moves to his direction, and dog is always trying to stay at the same distance. I know how to make object move toward player, but how to make it move away?

Im really sorry if this is a repost, I just couldnt find it on forums.
B
3
Posts: 2
Reputation: 289

Post » Wed Feb 20, 2013 11:38 am

Just spent 2 mins on this. It does the job. But without knowing (visually) what sort of scene you're trying to make, it is a bit hard to figure out what you wanted.

https://dl.dropbox.com/u/108799982/Capx%20Demos/BasicDodge.capx
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Wed Feb 20, 2013 12:24 pm

This should work if the object has a bullet behavier:

every tick ---> object rotate 1 degrees(x=Plyer.Y,Y=Player.X)

This makes it rotate away from the main player.
B
7
S
2
Posts: 18
Reputation: 891

Post » Wed Feb 20, 2013 1:16 pm

Thank You very much both of You, those tips works just as I need, ill experiment in using them both :)
B
3
Posts: 2
Reputation: 289


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, mystazsea and 16 guests