Rotation questions

Discussion and feedback on Construct 2

Post » Sun Jan 08, 2012 8:09 pm

hey guys
i have alot of questions about rotation and sprite movements

1-How to make the layer rotate slowly like a sprite move
2-how can i make a sprite move but slow down its speed gradually ( only with event sheet)
3-How can i make all objects stop when the sprite is rotating

Thank you
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Sun Jan 08, 2012 9:07 pm

Quick answers:
1 - anglelerp
2 - lerp
3 - global variable

Longer answers:
1 - You would have to set your layer angle using a to be add system expression anglelerp.
There is a way to do it in 3 events according to Yann, but I don't know it. Maybe some maths savy guy can come by here and enlighten us, I'd like to know that too.

2 - Lerp is another system expression.
It actualy already exists in C2 and you can check about it in the manual.
Pretty much the same logic as above, set the sprite X and Y to lerp(current sprite's position, destination's position, 0.5) (the 0.5 helps to smooth the thing)

3 - A variable that indicates that you want your object to move or to stop.
Set it to 0 and be sure to check that it is 0 in the event were you move your sprite.
When you want the objects to stop, set the variable to 1. When you want to move them again put them to 0.Kyatric2012-01-08 23:06:33
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 Jan 08, 2012 9:56 pm

@Kyatric
2-
I mean like move at a speed of 50 and decrease it speed till' it get to speed 1 ( this mean that it reached it destination )
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Sun Jan 08, 2012 11:06 pm

The answer is still Lerp (be sure to click it's another topic explaining the usage of Lerp)
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 Jan 09, 2012 10:03 pm

thank you @Kyatric
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564


Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, artbava, marydhamdan and 6 guests