Jump to content
xisto Community

brentyboy

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by brentyboy

  1. brentyboy

    Flash As2

    HI all, im needing help, im in flash as2 and im trying to make my enemys move diagonally downwards and when they reach the limits iv set (the buildings) i want them to bounce off and go the other way, but the way its going one it hits the sides, they just go down straight. i couldnt get it to work with hittests so iv just used > < limits. code as follows: onClipEvent (enterFrame) { enemySpeed = 2; sideSpeed = 4; if (this.hitTest(_root.newBullet)) { this.gotoAndStop("dead"); } this._y += enemySpeed; this._x -= sideSpeed; if (this._x<175) { this._x += sideSpeed; } if (this._x>375) { this._x -= sideSpeed; }} Notice from rvalkass: Please remember to put code inside Code tags.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.