The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: Car with a big gun on top shooty thing

  1. #1

    Afrostyle Car with a big gun on top shooty thing

    Well i think the title of the thread explains what the game is about

    here is the problem:

    The car is rotated by ._rotation actionscript and so is the turret. this conflicts with each othr when using atan2. i have fixed the turret rotating to the mouse but when i attach a movie it doent do the same thing. also if you shoot too rapidly the bullet kinda stops.

    ive attached the file if you wanna have a lil look through ( you probably do because i havnt explained the script)

    Thanks in advance

    Stupid Saint

    be nice to your neighbour; he knows were you live
    Attached Files Attached Files

  2. #2
    Got an unexpected format error. Using Flash 8 Professional here.

    I checked the swf, though, and interestingly, if you don't move the vehicle, the bullets are shot at the correct angles. After you move it, everything goes bogus. So, I can only assume you mix both angles at some point of your code. You should stick to turret angle when it comes to define shooting angles.

    I hope it already helps. It's not much, but it's the best I can do without checking the code.
    Last edited by bpalermo; June 19th, 2008 at 07:21 PM.
    Bruno Palermo
    When everything is catastrophic, thank the Gods things aren't worse!

  3. #3
    Registered User
    I assume then that the turret movieclip is contained within the car movieclip. One quick thing is that since the global rotation of the turret will be its own rotation plus the car's rotation, you could subtract the car's rotation when you re-assign the turret rotation.

    Also, I don't know if you've used localToGlobal and globalToLocal If you haven't you might want to look them up for some idea on how to fix this. That doesn't handle the rotation directly, but since you're using atan2 then you can run those x and y values through it, and get the x and y in the context you want.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012