So, Im making this game and I have gravity HALF figured out. I figured out how to get him to fall down after jumping, but what if he isn't touching any ground? I want him to fall, but if I make some codes I've already tried, it disables jumping! Please help!
Offline
I tried it, but an arrow key had to be clicked for it to activate and whenever it touched my ground, it would bounce up then sink down, bounce up, sink down!
Offline
Found this as a Report - I think it's probably a post
The_Scratch wrote:
I tried it and he kind of... bounced up and down when touching the ground. Here, I'll upload what I have so far (minus the new scripts you gave me) and tell me what scripts you think I should use okay?
Offline
@paddle2see yeah your right I clicked report thinking it said reply, because I dont use this forum, im used to a different forum where the reply is where the report is.
Offline
So the problem is that the player is bouncing? This is usually because 1 script is telling the player to fall with gravity and another telling the player to stand on the ground, giving a bouncing effect. You need to disable gravity whilst the player is in contact with the ground, or if you're aiming for an ultra-realistic effect then add an extra normal contact force (ncf) from the ground on the player equal to mass x acceleration due to gravity, so weight = ncf and resultant force = 0, thus the player doesn't bounce and remains still under balanced forces. When the player jumps, the ncf is removed and gravity will slow the player and bring them back to ground.
Offline
@Prestige heres my test test project you can download then tell me what scripts to fix/add/delete http://scratch.mit.edu/projects/TheScratchTest/2684378
Offline
Something to point out, too, is that something can appear to "bounce" on the ground in the regular view, but when uploaded, or in full-screen, the character stops bouncing. I'm not entirely sure what stop this from happening, but it makes elimination of the bouncing effect and precise stopping far easier.
- iNK
Offline
iNKGaming wrote:
Something to point out, too, is that something can appear to "bounce" on the ground in the regular view, but when uploaded, or in full-screen, the character stops bouncing. I'm not entirely sure what stop this from happening, but it makes elimination of the bouncing effect and precise stopping far easier.
- iNK
This is because the online players and Presentation Mode only update at the ends of loops or at waits in forever loops.
Offline
Ok so are you gonna talk about bouncing or help me? I dont mean to get angry but I think this might be my best game yet!
when gf clicked help me!!!
Offline
Paddle2See wrote:
Found this as a Report - I think it's probably a post
The_Scratch wrote:
I tried it and he kind of... bounced up and down when touching the ground. Here, I'll upload what I have so far (minus the new scripts you gave me) and tell me what scripts you think I should use okay?
LOL!!!
Offline
This doesn't benefit me in any way berberberber, does it fall when you are above a gap?
Offline
@Take2, I already know how to do that!!!!! I need to know how to get it to fall when theres a gap!
Offline
I found a project online that shows a script that creates gravity so that a sprite falls when it is not touching the ground. This should make the sprite fall through the gap. Here is the link:
http://scratch.mit.edu/projects/kizel623/286336
Hope this helps.
Last edited by shrey15 (2012-07-30 20:26:33)
Offline
You can use this engine http://scratch.mit.edu/projects/zubblewu/2703276
Offline
If you have a sensor, create a variable called down. Then, make it so that when the sensor no longer detects the ground beneath your player, it sets down to 1, if else, it sets down to 0. Then, in your character, if down = 1, use your gravity scripts until down = 0.
Hope that this is what your looking for!
Offline