loops and slopes issue

For questions about using Classic.

Post » Mon Apr 16, 2012 12:54 pm

hi again!

ive been trying to get together a small platformer focusing heavily on loops and slopes and using physics object as a method for moving around.
i have been able to solve most pressing issues vith angles and such, but theres still a lot of small things that make me frustrated, due to lack of my knowledge. first things first:

heres a small .cap to illustrate what im aiming at, the basic idea.

http://dl.dropbox.com/u/11157144/angle-issue.cap

now the most pressing issue with it is:
when the player is on air, not colliding with anything, id like to rotate it slowly to angle 0. BUT, im not sure how to do this, snice there doesnt seem to be a simple -rotate to angle- action. how would this be possible to achieve?
also, if you notice from the cap, when the player stops, the animation sprite jerks back and forth for a while, does anyone know how to remedy this?
lastly, theres an issue that when the player isnt pressin left or right while moving, the animation sprite wont check the slope angle.

i would be also very grateful, if someone would give some really awesome guidelines or tips for that .cap, maybe improve it a little or point out all the mistakes i have made. id really like to get this basic stuff working, so i could start evolving it and create some levels.
theres also the issue of having two separate animation sprites, because i dont know how to get the rotations to work properly with just one, it would save some precious resources if it could be done with just one anim sprite.

anyways, thanks for reading and i hope theres someone who could help out poor old me.

B
1
Posts: 7
Reputation: 239

Post » Mon Apr 16, 2012 3:54 pm

give a look at my SandBOX and how I handled it..

This is for Construct 2, but you can figure out on Classic.

The link is on my signature.TELLES08082012-04-16 15:55:28
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,192
Reputation: 18,301

Post » Tue Apr 17, 2012 1:19 pm

hey and thanks for replying. in fact, i remember trying that sandbox already some time earlier and it looks really promising. unfortunately, i didnt really find anything specific that would help me in these small issues.

one thing that's puzzling me:

that rotate to angle 0(or any angle really)
would i have to make comparisons with:
+player not overlapping anything/is on air
+angle is greater OR less than 0

then i would have to determine what direction i want the player to rotate in?
ive tried numerous things but never really succeeded.
comparing angles is also tricky for me:
should i always just compare angle inside the 360 value, or do i have to use negative value, since i see it used sometimes. meaning that the straight up direction for example is sometimes -90.

im not sure if im making any sense lol, but angles are making me feel really stupid.
B
1
Posts: 7
Reputation: 239

Post » Wed Apr 18, 2012 7:09 pm

There is a default system expression for the rotation(system-math-rotate angle.) It'll find the shortest "way" between two angles, so you don't have to worry about the 0-360 problem.

When the player is in the air you can set the correct angle by checking it's velocity - note: you should not check it for lower\higher than 0, use -1 and 1 instead.
B
10
S
6
G
3
Posts: 127
Reputation: 2,481


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests