Quote:
Originally Posted by Nihtgenga
I'm playing through this at the moment. It's fun and the TFs are well done. however, i'm getting some problems on Neighbourhood 3. The mousetraps are almost impossible to jump over and, unless you can get on them later and have to go back along them, the platforms are too high up to reach. also, if I try jumping a set of traps and fail, it sends me back to the start, but i'm still moving. The momentum makes me hit the first trap, which is really annoying.
EDIT- also, i went into the city dump and landed in the trash. I TFed into a cat. Game over. Problem is, there's no restart button there.
|
Fixed and fixed. I thought 1-3 was hard to begin with, so I removed the two most troublesome traps. And the missing restart button was a product of how that stage used to look. That has also been fixed. Updated the first post with the revised edition.
Also, that's a raccoon >_>
@Tolka (Not gonna quote that whole thing)
It's always hard pushing new code into a working project, so help me figure out what's going on with your code as it replaces this:
if (_root.ground.hitTest(this._x, this._y, true) && falling) {
jump = 13;
jumping = false;
falling = false;
}
Falling is a boolean that just turns on when the "jump" hits its peak. Jump is the value used for height. It subtracts a little at a time in the "on keyPress up" section. Jumping is just another boolean that turns on when up is pressed, and it prevents double jumps.
if (Key.isDown(Key.UP) && !jumping) {
jumping = true;
}
Self-explanatory.
if (jumping) {
this.gotoAndStop("jump");
this._y -= jump;
jump -= .88;
if (jump<0) {
falling = true;
}
if (jump<-15) {
jump = -15;
}
}
This is what isn't working when I implement your code into the Ground hit detection. As soon as I press Up, she falls through the floor. Left and right work, but not up.
The gotoandStop just goes to the char frame called jump. If I had an actual picture of a jump, it would be a jump. As it is, it's just one of the walk frames.
Once again, Jump is 13 and these next two lines dictate how fast it decreases.
Jump <0 is checking for the top of the jump so it can start the fall.
Jump <-15... to be honest I have no idea what this does. I just know without it, it doesn't work.
In case it weren't obvious, my experience in coding isn't with Flash. It's with Java.
I'll attach the code. All of this code is on the char movieclip.