jobel's Recent Forum Activity

  • try this..

    tap D once and hold to walk... double tap D and hold to run...

    let go: idle

    https://www.dropbox.com/s/apot10oh5jdx9 ... .capx?dl=0

  • if I wanted my personage to walk and to press 2 veces D run

    what are the walk controls?

    what is veces?

  • You will also have to create the inverse condition

    >> On key `Shift` is pressed

    `N`is Down

    Otherwise the order in which you press the keys would matter.

    it depends - if you want something only to happen when both are pressed, then yes, but in my case you need to add the modifier first. It's like when you type a capitol letter on a keyboard . You hit SHIFT first, then the letter. If you hit the letter first, the letter is lowercase, hitting the SHIFT after does nothing.

  • yes, put all your objects in a family in order to not have to test each one individually.

  • What do you mean "discover"?

    The Mouse object has CursorOverObject event - just know it will trigger 60 times per second, so add Trigger Once While True if you want it to act like a Trigger.

  • add a KeyIsDown to the condition to OnKeyPressed

    example add 2 conditions to your Event:

    On Key 'N' is pressed

    'Shift' is Down

    This will only Trigger when the player hits N+Shift together

  • ended up making this work..

    again it's "fake physics" under a controlled environment

    After Collision Accelerate by this much:

    (BlueBlock.Bullet.speed * BlueBlock.scale) * (min(50,anglediff(GreenBlock.CustomMovement.MovingAngle, BlueBlock.Bullet.AngleOfMotion)/3))[/code:2phzshzm]
    
    then I have a catch-all that makes sure the GreenBlock doesn't go beyond my top speed of 300 just in case I have a situation where it does add too much accel..
    
    this is all done based on "looks" and watching it for long periods of time.. now THAT is some hacky math!
    
    btw the GreenBlock is the "player" which never changes and has a top speed, so all the other obstacles are based on that constant.
  • yeah I'm not trying to do actual physics calculations.. just trying to get it 'approximate' .. it's a video game, so it doesn't need to be a perfect simulation by any means. The background is moving and the camera is lerped, so there's a high fudge factor. The biggest issue is the one I mentioned where the vectors are similar. I need to add that to my calculation and I'll be fine with it.

  • (VB-VA)·n+j*(j*nmassA+j*nmassB)*n+e*(VB-VA)·n=0?(1+e)((VB-VA)·n)+j*(j*nmassA+j*nmassB)*n=0?j=-(1+e)((VB-VA)·n)1massA+1massB

    yup that's what I figured..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can live with setting the Moving angle of the GreenBlock after a collision to:

    angle(BlueBlock.X,BlueBlock.Y,GreenBlock.X,GreenBlock.Y) - 180[/code:3ak5bxur]
    I just can't figure out how much to accelerate by.
    
    I started with some arbitrary numbers and found some that work for most collisions.  Then I tried to come up with a calculation that would fit those numbers.  Most of it works well.
    
    But it all fails in this one scenario where the BlueBlock is traveling right, and a GreenBlock is also traveling right but is going faster.  When it catches up to the BlueBlock, the move angles are correct, except my calc fails miserably by adding way too much speed to the BlueBlock.  My calculation doesn't account for trajectory.
  • R0J0hound any chance you could recommend something? just curious if this is even doable or if its more complicated than I'm making it.

    I just want to figure out how to take into account the moving angles, speed and how that would effect the 'force' or one-off acceleration.

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies