dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Actionscript 2 collison detection

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    1

    Unhappy Actionscript 2 collison detection

    HI,
    I am trying to make a game where you are a Pacman type guy, with an ak-47, and i have enemies, but i want to know how to make something happen When you hit them, like you die or something.

    The dude you are is called 'turret', and the enemies are callled 'enemy' (and randomly appear)

    Thanks.

  2. #2
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    Code:
    if(enemy[i].hitTest(turret))
    {
      enemy[i]._x = Math.random(400);
      enemy[i]._y = Math.random(400);
      turret.health-=5;
    }
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center