scarce
10-03-2009, 04:11 PM
ok, I'm moving my screen vertiaclly...i have it to very a variabhle is made based on the this.vy movement (*characters jumping variable*) this is a problem because if im not jumping, it's not moving...this is my code
if (stage1._y >= 454.5) {
if (theDrop == false) {
this._y = Stage.height / 2;
yMove = Math.round(this.vy - 1);
_root.platform2._y -= yMove;
_root.platform1._y -= yMove;
stage1._y -= yMove;
}
}
if (this._y <= Stage.height / 2) {
theDrop = false;
yMove = Math.round(this.vy - 1);
_root.platform2._y -= yMove;
_root.platform1._y -= yMove;
stage1._y -= yMove;
if (stage1._y > 454.3) {
this._y = Stage.height / 2;
} else if (stage1._y <= 454.3) {
theDrop = true;
this._y += this.vy;
yMove = 0;
}
}
platform1 is the ground, platform 2 is every other platform...here's my collisions just incase you need to see that too...
function heroCollisions(ob) {
if (ob.hitTest(stopper_scroll)) {
ob.vx = 0;
}
if (ob.vy >= 0.5) {
if (_root.platform1.hitTest(ob._x, ob._y, true)) {
eraserOn = 1;
if (jumper == 0) {
kickStop = false;
bok = false;
ob.vy = 0;
ob._y -= g * 3;
ob.jumping = false;
_global.jumpAttack = false;
falling = false;
}
}
while (_root.platform2.hitTest(ob._x, ob._y, true)) {
eraserOn = 2;
if (jumper == 1) {
jumper = 0;
}
if (jumper == 0) {
kickStop = false;
bok = false;
ob.vy = 0;
ob._y -= g * 3;
ob.jumping = false;
_global.jumpAttack = false;
falling = false;
}
}
}
}
I'm getting confused and frustrated please help me. Any questions just ask HELP PLEASE
if (stage1._y >= 454.5) {
if (theDrop == false) {
this._y = Stage.height / 2;
yMove = Math.round(this.vy - 1);
_root.platform2._y -= yMove;
_root.platform1._y -= yMove;
stage1._y -= yMove;
}
}
if (this._y <= Stage.height / 2) {
theDrop = false;
yMove = Math.round(this.vy - 1);
_root.platform2._y -= yMove;
_root.platform1._y -= yMove;
stage1._y -= yMove;
if (stage1._y > 454.3) {
this._y = Stage.height / 2;
} else if (stage1._y <= 454.3) {
theDrop = true;
this._y += this.vy;
yMove = 0;
}
}
platform1 is the ground, platform 2 is every other platform...here's my collisions just incase you need to see that too...
function heroCollisions(ob) {
if (ob.hitTest(stopper_scroll)) {
ob.vx = 0;
}
if (ob.vy >= 0.5) {
if (_root.platform1.hitTest(ob._x, ob._y, true)) {
eraserOn = 1;
if (jumper == 0) {
kickStop = false;
bok = false;
ob.vy = 0;
ob._y -= g * 3;
ob.jumping = false;
_global.jumpAttack = false;
falling = false;
}
}
while (_root.platform2.hitTest(ob._x, ob._y, true)) {
eraserOn = 2;
if (jumper == 1) {
jumper = 0;
}
if (jumper == 0) {
kickStop = false;
bok = false;
ob.vy = 0;
ob._y -= g * 3;
ob.jumping = false;
_global.jumpAttack = false;
falling = false;
}
}
}
}
I'm getting confused and frustrated please help me. Any questions just ask HELP PLEASE