pulsecode's Forum Posts

  • 8 posts
  • Ahh ok, i think i understand :^)

    And yeah agreed, if it always had to come last, once a project got complicated that could be hard to manage. SP the wait 0 seconds is very handy.

    Nice one, thanks a lot dop2000

  • Fantastic! Thank you very much dop2000, that works beautifully :^)

    Just a quick question. Can you explain the "Wait 0 seconds" part? I know it's required but just the logic is slightly lost on me.

    I was under the impression that Every tick would be all you need for something to run constantly, but i saw that taking the Wait 0 seconds out means it works if say, i'm recording the x collision while still moving (jumping and landing while moving left or right will give me the x collision vector when i land) but not if i run into a wall, where all movement stops.

    Would just be useful to fully understand.

    But yeah, great and concise answer that has saved me tearing my hair out haha! Thank you :^)

  • I'm working with the platformer behaviour and i'm struggling to do a few things i used to do with Clickteam Fusion (still acclimatising and getting used to the differences!)

    What i'd ike to be able to do is, when the player hits a wall, a ceiling while jumping or the ground when falling (or i guess immediately as a fall ends!) is record the speed they were moving at that moment.

    My problem is, if i do this on collision, the platformer behaviour has already helpfully stopped the movement and so i can't get a speed value. And at this point, i'm stumped! Is there a solid way to record the x and y speed at which the player was moving when a collision occurs?

  • Hey! Thanks for fixing it alextro :^)

    Ooh, very interesting indeed! I'd not really looked too much at the Custom Movement behaviour but it looks really quite interesting.

    The way you're getting teh angles for collisions is interesting too! Though i feel klike it wouldn;t be very practical in a tile based game.

  • Thank you very much for the replies :^)

    alextro, sorry but i can't open your file for some reason (it says "Failed to open project. Check it is a valid Construct 2 single-file (.capx) project." when i try)

    R0J0hound very interesting! The thory is really rather clever :^) Unfortunately it seems to be a little unreliable in as far as sometimes, it just doesnt bounce. But i'll try and analyse quite why that is.

    Yeah, i had thought about maybe trying to work out the surface normal of the wall you're colliding with (though i don't really know how you'd do that in Contrsuct?) but i'd be stuck even befre that anyway as i simply cannot figure out how to record the collision velocity.

    In Fusion what i did was have two variables (one for x and one for y) that i updated constantly with teh x and y velocity. The condition for changing the variables was that the player was not colliding with the walls. That way i knew that when i WAS colliding, that variable was frozen for that frame at the speed it was travelling at immediately before the collision.

    But in construct 3, using the platform behaviour, it's like any event i try and trigger to freeze or capture the veklocity immediatly before or at the point of collision is firedc after the platform behaviour has already brought my player to a stop.

  • I’m trying to get my head straight on a few things that have me tied up in knots a little after moving over from Clickteam Fusion. I’m hoping I’m just missing simple things and am also not knowing the right wording for what I’m trying to find :^)

    I’m working with the platform behaviour, and the best way I can describe what I’m trying to do is, imagine the player has a jet pack!

    Once the player is airborne, you can press a button to fire the jetpack thruster and use left and right to move them, with a fair amount of floaty inertia.

    This is all absolutely fine and works well. But where I’m falling down a is, collisions with the scenery!

    What I’d like to achieve is, when you are flying, colliding with walls / ceiling will bounce you off. Not a fully elastic bounce, more like some of the impact velocity is being absorbed.

    My first thought was trying to record the x and y velocity at the point of impact and using these values to bounce you off, remove a bit of the actual impact velocity to make the impact feel better and also use it to subtract from a health meter of sorts, but I immediately hit a problem which was, I assume the platform behaviour has already seen the collision and stopped my player before my On Collision event fires, asking how fast you’re going (as it always returned 0).

    But then I figured this might not work very well even if I could get the values I wanted, for angled surfaces (probably mostly 45 degrees and 30 degrees as the game will have tile-based scenery). Working out the appropriate bounce angle out could get messy.

    I had read somewhere that maybe the bullet behaviour would be good for handling the bounces, and a quick experiment with just setting its speed and acceleration to 0, Gravity to 1000, setting Bounce of solids to true and removing Set angle, yielded quite decent results. The new problem(s) here are that I don’t see any obvious way to affect how much bounce actually happens and also, how I would possibly combine this with the platform behaviour or even make the bullet player controllable!

    I might just be going off on entirely the wrong tangent so I thought before I buried myself in this, I’d ask in here and see if anyone could point me in the right direction :^)

  • Hi Ashley,

    I do indeed! What im more curious about is the springing back to a "default" position behaviour.

    Im not sure how possible it would be to kind of man handle the physics behaviour that way.

    What do you think?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys,

    I have been experimenting a bit with Construct 3 and am really quite impressed with what it can do. I've been converting a project of mine over from Fusion 2.5 and all is going smoothly but...i had a bit of a brain wave!

    I think my project could well benefit from running physics, as opposed to kind of arcade simulating it (as it does now) but there is one thing I'm unsure of, that I'm not sure is possible or not. That is the purpose of my post :^)

    So what i'd like some input on is, is this possible:

    Imagine a physics object, pinned to another with a joint. the back object is there as the anchor for the foreground object and the foreground object is the one that collides with the scenery.

    What i want to be able to do is make it so the foreground object has a limited degree of rotation on the joint (say 20 degrees clockwise and counterclockwise) but that it always returns to it's center point (directly upwards)

    So if it were to come into contact with the scenery for example it might rotate to the left 16 degrees, and then rotate back (when no longer in contact) to face upwards again.

    I can probably knock up an image or two, to explain this better if needs be! :^)

  • 8 posts