so my game’s code is as follows:
//The Austin Weisgrau (El Nacho)
//Blob Game, to go with the video so it will get like the .3 mor it needs not to be blammed
stop();
Blob_Movement = {x: 0, y: 0};
World_Gravity = 1;
function Blob_Slowdown(){
Blob_Speed *= .9;
if(!Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT))
{
if(Math.abs(Blob_Movement.x) <= 1){
Blob_Movement.x = 0;
Blob.gotoAndStop(1);
}
else if(Blob_Movement.x <= 0) Blob.gotoAndStop(4);
else if(Blob_Movement.x >= 0) Blob.gotoAndStop(5);
}
}
onEnterFrame = function(){
if(Key.isDown(Key.LEFT)){
Blob.gotoAndStop(3);
Blob_Movement.x -= 4;
}
if(Key.isDown(Key.RIGHT)){
Blob.gotoAndStop(2);
Blob_Movement.x += 4;
}
Blob._x += Blob_Movement.x;
Blob._y += Blob_Movement.y;
Blob_Movement.y += World_Gravity;
Blob_Slowdown();
/*
while(Background.hitTest(Blob_Movement.x+_x, Blob_Movement.y+_y, false))
Blob_Movement.x -= Math.abs(Blob_Movement.x)/Blob_Movement.x;
while(Background.hitTest(Blob_Movement.x+_x, Blob_Movement.y+_y, false))
Blob_Movement.y -= Math.abs(Blob_Movement.y)/Blob_Movement.y;
*/
/*
if(Background.hitTest(Blob)){
Character_Movement.y -= math.abs(Character_Movement.y)/Character_Movement.y;
Character_Movement.x -= math.abs(Character_Movement.x)/Character_Movement.x;
*/
}
}
the character instance is Blob and the background instance is Background. i can’t get the hitTest to work with either of those two things in the /* */ and i need to no how i can