loops and slopes issue

This forum is currently in read-only mode.
From the Asset Store
40 ambient sound loops. A wide selection of looping ambient sounds for different locations.
  • 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.


    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.

    <img src="smileys/smiley1.gif" border="0" align="middle">

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)