Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 Viewsjust wont work for some reason, all ti does is go right through. here s the example.
File: http://spamtheweb.com/ul/upload/050509/7 2838_theblockgame.swf
the red circle is the character. i made individual sides to the block along with individual instance names. but he goes right through ¬_¬'
here is the code:
onClipEvent (load) {
var moving:Boolean = false
var i = 1;
var xdir = 0;
var ydir = 0;
radius = 20;
}
onClipEvent (enterFrame) {
if (i>0) {
moving = true;
i -= 1;
_x += xdir;
_y += ydir;
} else {
moving = false;
}
}
onClipEvent (keyDown) {
if (Key.isDown(Key.UP)) {
if (moving == false) {
i = 10;
xdir = 0;
ydir = -2.5;
}
} else if (Key.isDown(Key.DOWN)) {
if (moving == false) {
i = 10;
xdir = 0;
ydir = 2.5;
}
} else if (Key.isDown(Key.LEFT)) {
if (moving == false) {
i = 10;
xdir = -2.5;
ydir = 0;
}
} else if (Key.isDown(Key.RIGHT)) {
if (moving == false) {
i = 10;
xdir = 2.5;
ydir = 0;
}
}
}
onClipEvent (enterFrame) {
while (_root.blockdown.hitTest(_x, _y+radius, true)) {
i = 10;
xdir = 0;
ydir = 12.5;
}
while (_root.blockup.hitTest(_x, _y-radius, true)) {
i = 10;
xdir = 0;
ydir = -12.5;
}
while (_root.blockright.hitTest(_x-radius, _y, true)) {
i = 10;
xdir = 12.5;
ydir = 0;
}
while (_root.blockleft.hitTest(_x+radius, _y, true)) {
i = 10;
xdir = -12.5;
ydir = 0;
}
}
I have tried a lot of things, but they dont make any difference :/
help?
Destroyed.