GDSag3's Recent Forum Activity

  • Ok, phew, done it. The ball hits the same height all the time. What I need to figure out now is how to introduce more balls at the exact right time, so each ball can potentially be hit by the player every second. No longer, no sooner. Should I do this by simply using wait triggers or should this be a little more complex and require timers?

    First I have to time how long it takes the ball to drop from the top of the screen to the bottom. I have set up a time variable to do this but my issue is it only counts in seconds (right now, with the set gravity it takes two secs to drop from the top to the bottom and four seconds to bounce from players hand, reach the top of the screen, and fall bck down). I need more detail than that so how do I use the time variable to count milliseconds as well?

  • Right, so, using what you suggested I now have the ball falling to the ground from up above when created, it bounces off the players hand and I've got the angle (Set vx to BallSprite1.vx-120).... I just need to work on some form of gravity. Now, do I do that with the vx and vy or should I just use bullet gravity for bringing it back to earth?

  • Er, you've lost me. Under what action should I use for those variables?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I've resorted to using objects as a trigger combined with wait. So, when score is 2 and the first ball makes contact with a ceiling object, the second ball is created 2 seconds later. Using this method, with three balls in play, each one is within reach of the player and there doesn't seem to be any unfair situations.

    However, this isn't exact enough because when any ball is hit by the player, say at the side of the hand rather than on top, that thrown ball then does not get thrown as high as when it hits on top of the player hand. So eventually that will create a situation where each ball is no longer a second apart when returning to the ground.

    Right now, thrown balls is done via bullet behavior and I have it where if the ball hits the right hand, its angle arcs to the left. And vice versa. This is fine. What I have for movement is just basic bullet speed and this is what is preventing every ball from reaching the same height every time (speed of 700 when bouncing from the top of player hand will go higher than speed of 700 when bouncing from the side of the player hand). So, is there another way to make sure each ball hits an exact ceiling before gravity brings it back down again? With this, I should be able to maintain each ball always being a second apart.

  • Just to talk on this more. I already have it setup where each ball follows its own arc depending on where it was hit by the players hand. So what I need to do is control the speed of each ball when a new ball comes into play so the new ball can fit in to the cycle (almost like traffic). Except, I don't think merely altering the acceleration and speed on each ball will be enough as I suspect that will still eventually lead to an unfair situation. Rather, acceleration and speed of any ball actively changes when being compared to the other balls, to create an order. I'm not too sure. I know what I want it's just I'm not sure what would be the best way to go about it.

  • Think of a juggling game with multiple balls in play. ALL the balls have to be kept in play and the player has to move to each falling ball in order to throw it. So I'm trying to figure out a way to control when each ball returns to the ground, giving the player a chance to hit each one. Otherwise, eventually it ends up where two balls return to the ground at the same time and it becomes impossible to hit both.

    So, what I am thinking is:

    Game Starts = One ball.

    Time it takes for thrown ball to return = 4 seconds

    Score is 4 = New ball is spawned (two balls)

    Each ball is 2 seconds apart from each other when travelling the air and in returning to ground

    Score is 8 = New ball is spawned (three balls)

    Each ball is 1.35 seconds apart from each other when travelling the air and in returning to ground

    Score is 16 = New ball is spawned (four balls)

    Each ball is 1 second apart from each other when travelling the air and in returning to ground

    Something like that. And that distance is always kept in play, no matter what. That way it does not become unfair and the player has a chance to reach each falling ball (if they're good enough). Am I on the right start point in thinking that maybe distance travelled could be used for this?

  • Basically, the player sprite can charge a jump left or right by holding down the left or right arrow keys. The problem I have is by holding down the right key and then pressing the left key, it interrupts the charging I was initiating with the right key. And vice versa. How would I go about avoiding this? Thanks

  • Now, change the values to get the sort of jump you like (in height or length) and how long it takes to charge, etc.

    postimg.org/image/ot02u68z7/full

  • Oh hello!

    Yes. It is not the most elegant of solutions but it does indeed work. Give me a sec, I will post it.

  • ...

    ..

    .

    .

    .

    Why do I always go about things in the most complicated way? I had set up this really long winded way to deal with it but was having issues with it. Thank you, that did the trick.

  • First off, I have a charged jump forward mechanic where the length and height of the jump is determined by how long a button is held. My issue is at the end of these jumps. I want to completely avoid sliding of the player object after it jumped and has landed back on the floor, so I crank up the deceleration. Thing is, this now has the knock on effect where the 100% charged jump now only covers as much ground in length as the 50% charged jump, due to the 100% jump going higher and thus deceleration having more of an impact on its movement forward. So, how can I work around this? Is there another way I can stop sliding without resorting to deceleration? Thanks

  • Ok, I've attempted the above and it seems to work. What I'm stuck on now is making sure the motion of the object after it has jumped ends instantly when the object comes into contact with the ground again. Right now, the object is sliding (I'm using physics behaviour). I need to make sure that each of the seven jumps (activated depending on how long the key is held for) covers the same distance if repeated. Can anyone help?

    Just another thing to ask, would physics behaviour be apt for this? If I want the exact same distance covered if the player repeats jump #3 (hold button for half a second) then is there another behaviour that would give me that exactness?

GDSag3's avatar

GDSag3

Member since 2 Mar, 2015

None one is following GDSag3 yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies