AC Problem :S
Im Working On A Game, I Havent Decided A Name But I Have Come Across A Problem, I Have Drawn A Up And Down Hill Sloping Ground, My Problem Is When I Make My Character Move Up It He Just Walks Into It, And Then When I Tell Him To Jump, He Appears Ontop Of The Ground He is Inside.
Any Advise // Actionscipt Problems?
My Characters Actionscript Is:
onClipEvent (load) { moveSpeed = 10;}onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { this._x += moveSpeed; } else if (Key.isDown(Key.UP)) { this._y -= 0; } else if (Key.isDown(Key.DOWN) && !fall) { this._y += 0; } else if (Key.isDown(Key.LEFT)) { this._x -= moveSpeed; }}onClipEvent (enterFrame) { if (Key.isDown(Key.SPACE) && !jumping) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y -= 2; if (vel_y<=-15) { vel_y = -15; } this._y -= vel_y; } if (_root.ground.hitTest(this._x, this._y+35, true)) { vel_y = 0; jumping = false; }}onClipEvent (enterFrame) { this._y += 16; if (_root.ground.hitTest(this._x, this._y+1, true)) { this._y -= 16; }}
And My Ground Simpally Uses A Instance Named ground
I Really Need Some Help Here, And If Possible, Any Other Tips For My Game?
If You Have Any Other Tips For Me Then Please, PLEASE Tell Me
Thanks Allready
Alex
P.S.
I Will Upload If Needed :)