The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 Viewscan someone have a look at the engine im making right now?
SWF<<<
code:
if (bg_mc.hitTest(car_mc._x-80, car_mc._y, true)) {
if (speed<0) {
speed = -speed;
}
} else if (bg_mc.hitTest(car_mc._x+200, car_mc._y, true)) {
if (speed>0) {
speed = -speed;
}
}
bg_mc is the black line, car_mc is the car and speed is the speed at which the car moves.
as you might be able to see, despite hitting fine on the left wall (sorta) the nose doesint sence the rest of the walls. Im using AS2 Flash8.
I hope you already know how much of a pain it is with so little handling/speed and such a large car :/
But you've gotten farther in Car hitTests than I so I can't really help.
its only a basic engine, resizing, handling, speed ect.. are all one variable changes!
can anyone Really good with hittests Pm me about
This
The simplest solution would be to make 4 points inside the car mc (like a rectangle boulding box), then use localToGlobal so you get their positions on stage, then you use the 4 points to hittest.
wibble wabble
no idea how to use localToGlobal atlest... Ill just make 4 normal shapeFlag hitTests