Question about timing and variables *resolved*

Just started using Construct 2? Post your questions here

Post » Sat Jan 17, 2015 4:46 pm

What I am trying to do is a "bobbing" movement for a ship by making the sprite rotate first in one direction and then in another.

You can see my events here.
bobb.PNG


Why is it not working? Is there something specific about how Construct treats conditions?
You do not have the required permissions to view the files attached to this post.
Last edited by tavi on Sun Jan 18, 2015 10:17 am, edited 1 time in total.
B
7
S
2
Posts: 68
Reputation: 645

Post » Sat Jan 17, 2015 6:57 pm

Local variables are reset every tick unless you make them static. So timer will never reach 200.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Sun Jan 18, 2015 10:16 am

Thank you!
I did not anticipate that!
B
7
S
2
Posts: 68
Reputation: 645

Post » Sun Jan 18, 2015 10:19 am

But wouldn't just adding a sine behaviour with rotation do this neater and possibly look better because of the easing?
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sun Jan 18, 2015 12:00 pm

Wow! Indeed it looks better.
I am still very new to C2 and don't know all its possibilities ).
B
7
S
2
Posts: 68
Reputation: 645


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest