View Full Version : Shot of the enemy
DAINO
March 20th, 2010, 12:34 PM
hello, i am building a game now and i have a problem with the the shot of the enemy.
now, the problem is that i want that the enemy will shoot on the hero Where that he is found.
ok, so i am upload the FLA and i hope that someone can help me.
like that you see the problem is that the her shootings are incompatible to this line of the enemy.
Thank you to the all those who helpful!!!
TOdorus
March 21st, 2010, 02:04 PM
First off I'm going to plug PRadvans site which has a sample FLA (http://www.freeactionscript.com/2009/06/flash-game-projectile-weapons/).
What you're going to apply is trigonometry "Dave" has a good site on it here (http://www.clarku.edu/~djoyce/trig/). What you're looking for is in chapter 10, but it won't hurt to work your way through the other chapters. Before you say anything about it taking too much time: I use trig in all my games and most engines run trig a few thousand (if not million) times a second. Learning it now can save you a lot of time later and give you a base to understand more advanced physics and ai.
Edit:
This one (http://www.albinoblacksheep.com/flash/trig) is pretty good for what you're looking for too, but not much more.
eltondeveloper
April 6th, 2010, 01:41 AM
thanks for the information
really great and i used ur ideas
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.