cincipon's Forum Posts

  • I'm suggesting that since it works fine when gravity is normal, having a condition that checks to see if gravity is reversed will let you then add an action that reverses the force of the magnets. The best place I see to do this is right before you "Set Platform VectorX" and "Set Platform VectorY".

    Something like :

    On Condition "GRAVITY IS REVERSED"

    Action "fx = fx * -1" Action "fy = fy * -1"

  • So the MovingAngle is the current angle, but it could be negative, so you add 360 to ensure it isn't. I'm assuming you add 22.5 to force it to choose one higher (a rounding effort) and then you mod it by 360 to get it in range (0-359). You divide it by 45 to see which animation you should be showing because there are 8 directions, and 8*45 = 360.

    If you really want 32 animations you'll need to divide by 11.25, and instead of 22.5 you'd add 5.625

    (I could be totally wrong too!) BUT I am right in saying your game and your hero sprite are wonderful!

  • perhaps it is as simple as

    if gravityReversed > fx *= -1, fy *= -1 right before you add the fx and fy to the vectors at the end?

  • Decide how forgiving you want to be, then create some fun if statements!

    If x <.334 and x > .332 string = "1/3"

    if x = .25 string ="1/4"

    if x < .1668 and x > .1666 string = "1/6"

    do this for every possible fraction you care about.

    would be smartest to create a function to contain these checks as well.

    FUNction

    function string decimalToFraction(x){

    if if if ...

    return string;

    }

  • Wonderful! I _LOVE_ Smash TV! Good luck.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aha, well I stand corrected. I'll give this a shot.

  • I'm considering it, though I don't know if I'll use C2 just yet. Still time to decide on both! Have you made one before?

  • The action is "Apply Impulse at Angle" and the Parameter is the formula to find out the angle between the player and the object to apply impulse to.

    So whenever you select an action (almost any action) there is a window with a textbox that you can type into to input X and Y or whatever you are inputting. Above (I think) that is a greyed out textbox that appears, and becomes opaque when you hover over it (@Ashley I think this is a bad UX decision). Once you've found that, you can pcik the System object, then scroll down and pick the angle expression, and it will help you along.

    Once you get more used to this sort of thing it will become MUCH friendlier to say sytem.angle(x,x,y,y) or object.Platform.VectorY than it will be to say click this choose that do this. =) Good luck!

    Play around with it, if you fail, put together a capx and link to it here and we can look into it.

  • Very likely you would expand a circle outward from the center of the player (maybe using Sprite.setScale()?), and check for collisions at each step. If a collision occurs, you would move the enemy(or whatever) object at an angle (found by taking the system.angle(x1,y1,x2,y2).

  • Ashley Hi there, it would be lovely to be able to have two versions of Construct 2 installed at the same time. If I am developing something with the stable release, and at the same time want to be helpful and examine someone's capx made with the beta version, I am out of luck.

    It would be better for the community to be able to use both versions simultaneously, and better for your development as well, I would think.

  • Upload your capx if you are still having problems. (please don't be beta, please don't be beta)

  • or if you've added swimUpVector to the player's variables, then it will be player.swimUpVector.

  • Glad you got it working! If you're in a sharing mood you could post the basic movement capx so other people can benefit from your work =) We need more beat-em-ups. (I'm hoping someone makes another river city ransom style game soon.)

  • wouldn't it be smartest to show a few at a time, and use AJAX to load new ones as old ones scroll offscreen? (while using a buffer... e.g. if you're showing 6 at a time, have 12 loaded (3 ahead, 3 behind in case they scroll either way)

  • ensure you you a keyboard object in your project.

    add event: Keyboard>KeyIsPressed>Space (or whatever you use for jump)

    add condition: Player>IsOverlappingOtherObject>Water

    add action: Player>Platform.VectorY = Player.Platform.VectorY + swimUpVector

    where swimUpVector is the amount of upward velocity per tick that should be added to the player. try 250 or so and work from there.