Shooting problam

How can I do, that when I press on any place on my stage, a rocket will come to that place, from a mc?

-thanks

Man, I didnt understand a thing you said. Just phrase it a little better and I’ll see what I can do.

peace

http://www.purephotoshop.com/article/105

hahahaha i think what he is trying to say is : lets say he has an mc call “cannon” and a mc called “bullet” how can he make it so that when you click the cannon shoots the bullet to that spot you just clicked

well at least i hope thats wat he meant

That’s basically what he just stated…

Depending on how you have the cannon and how the camera angle plays into effect… Will help… But you will have to know a little bit of trig to get this to look right my friend… If I wasn’t leaving to get some sleep… I’d post the variales and the functions you’ll need to figure out the lengths and the such…

Well… Actually… Let’s do it this way :

With the dashed lines… You can get a feel for how you would have to break up the functions… You would take the length of the target area you clicked at… subtract that from the mc’s target location… and then divide that amount by a certain amount… I’d suggest dividing it by 50 or more… To create a more fluent movement… :slight_smile: Then you can just incremement the rocket ever frame by that said amount… until it hits the target area… :smiley:

Umm… Sorry I am kind-a vague… I very rarely just hand people code… I just tell you how to do it… In logical thoughts… :wink:

thanks evety body.
thanks for replaying but I still, it is not working… :
here is a link for the shoot I want-
http://www.squarecircleco.com/games/cannon/index.html

Can u help me?

-Thanks

I can figure out how to fire ,but I don’t know how to make a cannon rotate as the mouse moves.

Example:

[img]http://img.photobucket.com/albums/v419/Commandersa/Ex2.gif[/img]