A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: help with td tower placing

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    67

    help with td tower placing

    hey.
    im wondering if anyone knows how you would go about placing towers in a td game like in onslaught. that being, they don't have to align with tiles, they can go anywhere as long as there not on a path tile.
    i cant think of how you work work out the collision detection to make sure your towers not on the path.

    if anyone could help, that would be great!
    much thanks in advance

  2. #2
    do your smiles love u? slicer4ever's Avatar
    Join Date
    Dec 2005
    Location
    in a random occurance
    Posts
    475
    if your using a tile system simply loop though the path tiles before you place the object to make sure it's not on the path, simple as that

  3. #3
    Member
    Join Date
    Feb 2008
    Posts
    83

  4. #4
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Hittest the path against shape of tower.

  5. #5
    Member
    Join Date
    Jun 2007
    Posts
    67
    thanks for the help
    lol i figgured there would be some complex math formula or something, but hittest will do the job.
    thanks again!

  6. #6
    The Cheeze to Your Macaroni ColbyCheeze's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    244
    I think that tends to be a problem with a lot of newer programmers, and sometimes even the rest of us (I know I do it a lot). Sometimes we have a very simple problem, yet since we don't initially think of the solution we assume it must be something very complex lol.

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