Ok, as everyone might know, I have been working on an art based game for some time now, and I have yet again run into a another problem with the ground. I want to create some moving platforms that go side to side or up and down, and I want the character to be able to walk up and down slopes. My code for the ground goes like this:
onClipEvent (enterFrame) {
if (_root.limits.hitTest(getBounds(_root).xMax, _y, true)) {
this._x -= 2;
}
if (_root.limits.hitTest(getBounds(_root).xMin, _y, true)) {
this._x += 2;
}
if (_root.limits.hitTest(_x, getBounds(_root).yMin, true)) {
this._y += 5;
}
if (_root.limits.hitTest(_x, getBounds(_root).yMax, true)) {
this._y -= 5;
}
}
If any one would like to help, please reply. thanks in advance :thumb:.
-El Pooter.