Ok, so i'm working on a tile-based game, and now my code isn't working correctly.onEnterFrame = function(){ if(this.hitTest(_root.char)){ if(_root.char._y >= this._y){ if(_root.char._x = this._x-10){ _root.canright = false; } } } if(this.hitTest(_root.char)){ if(_root.char._y >= this._y){ if(_root.char._x = this._x+40){ _root.canleft = false; } } } if(_root.char._x < this._x-10){ _root.canright = true; } if(_root.char._x > this._x+40){ _root.canleft = true; }}This is in my block tile's actions. So when I test the movie, the left wall blocks me, but if I hit a right wall, I just pass through it at double speed. Does anyone know what's whong with my code?
Oh, and before the code for left wall was added, right walls worked perfectly well.
Ok, I'll try that tomorrow.
You must be logged in to post a reply!