Prominent's Forum Posts

  • My case is a bit unusual, so I had to work out my own collision detection. I managed to get it bouncing accurately by calculating a projection vector for each axis, and flipping the motion with the shorter projection.

  • If I have a square box with bullet behavior that bounces off a solid object that is also square, the reflected angles eventually become inaccurate. Why is this?

    How can I get accurate bouncing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can "Pick Nth instance" in the System conditions.

    Then use object.Count-4 as the Nth instance to check the frame.

    Do the same for object.Count-3 and object.Count-2

    If all have same frame as the new object, then change it to something different.

    Something like that. This is one way to do it. You can also use a variable to count how many repeats there are, and reset it if it doesn't repeat. If variable is above a number, then choose accordingly.

  • Check their properties to see if their Global value is set to No. If it is set to Yes, they won't be destroyed when layout changes.

  • Based on what I see there.. Maybe you can try testing if a point is overlapping an object (one of the system conditions). Put all your climbable stuff in a family, and test against that using the y position of your player, and bboxleft-1, bboxright+1 positions. That way, you won't need to use the extra sprite.

  • If you're going to do it that way, try adding a Timer behavior to your player and use the timer events instead, because with that you can cancel the timer when the space key is released so that this issue is avoided.

  • Looks like you're trying to swap two items?

    I don't think you need the for each XY element. My guess is that it is swapping multiple times because it is looping through each XY and performing the actions for each XY element.

  • Plays pretty well, I like it so far. Timing the attacks is interesting component to the game- probably the main thing that stands out to me.

  • what sorcery is this!? no custom plugin/behaviour?

    No custom plugins/bahaviours. Just the standard stuff Construct 2 comes with.

  • Grappling hook has been updated! Now works extremely well, along with the ability to adjust length of grappling hook. You can also set a global variable if you want the grapple hook to remain stiff when swinging upside down. You can also walk on floor while grapple is hooked.

    http://youtu.be/1gsTUfi_ma0

  • oh okay, I just checked out your capx. I didn't realize you were already stretching them out.

    It looks like the issue is that the end of the ramp that slants down doesn't end below the flat platform, so the character won't know to step up onto it. If you tilt it down slightly so that the corner goes through the flat platform, then it works appropriately.

  • I'm guessing those platforms use the jump-thru behavior, and your character is using the platform behavior. I've ran into the same problem before. From my understanding, the issue is due to how the platform behavior is implemented- here's a response I got to another bug I had related to jump-thru behavior..

    What I would do is use an invisible sprite, about 2px by 2px, and give it the fall-thru behavior, and resize it so that one of them stretches across all of those sprites. That way there is no gaps/edges to cause this sort of bug.

    Or, another thing you might want to try, which I haven't tried before, is to adjust the collision box of the character so that the corners look something like this - \_____/ .. instead of |____| .. That might help? but I never tried that.

  • I noticed this recently as well. Does the physics object have any joints on it? I'm wondering if the joints are affecting the value.

    Perhaps you can record the last position it was at (in the previous event cycle), and calculate the current trajectory based on that?

  • Hasan999, the reason why the angle is set is because setAngle has no relation to physics- hence it doesn't need to wait for physics operations. What I'm asking about is related to the implementation of the physics and how the joints get updated.

  • hundredfold, joints can only be made one way.

    There's no way of knowing if the joint has been made yet, though, which can give you in-adverse effects if you need to carry out an operation based on that information. It won't work if you just set a variable when you add the joint, because the joint won't be made exactly when the variable is set.

    physics updates every tick before the events are ran. Is this the case for joints (because it doesn't appear to be)? Do joints get created when a physics object is created, or do they get added after they get created, and if so, when?