How I can make circle direction move

Get help using Construct 2

Post » Wed Jan 25, 2012 12:59 pm

Hi all, how I can make circle direction move?
Example:

If Left arrow is down: player move left (around). If right - right...
But if player dont touch any keys - spaceship dont move.

Game template: http://www.mediafire.com/?wtahtkn0ogjt38w

PS. I has instaled C2 three days ago and don't know simple things :)
B
8
S
2
G
1
Posts: 2
Reputation: 732

Post » Wed Jan 25, 2012 8:10 pm

I'm making a game with similar movement for my rotary compo game

By using this expression:
X = centerX + sin(a/pi)*radius
Y = centerY + cos(a/pi)*radius
Where a is the period of the movement

You get this:

World.X/Y is the center of the level
Speed (global var) is speed + playerX (which is changed by pressing left/right)
Height (global var) is height + playerY (or can be a fixed value, for constant distance)7Soul2012-01-25 20:11:06
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Thu Jan 26, 2012 12:31 pm

Thanks :D ! but I make something wrong and my spaceship does not move. And I don't know why. :(
If not so hard can you see where my problem?
http://www.mediafire.com/?ng95aco8k3mb489
I'll be very grateful :)
B
8
S
2
G
1
Posts: 2
Reputation: 732


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul, nicklowkcmagic and 19 guests