PDA

View Full Version : A lot of people know this and I don't lol


Etou
06-01-2003, 09:42 PM
If someone knows how to make this, can you tell me how please? I never knew how and I always wanted to know.

thanx

Oh and sorry for my graphics lol I just wanted to make a fast example

LilleMartin
06-01-2003, 11:11 PM
Just a friendly tip:
It is completely impossible to make heads or tails of what you need help with.

-M

Etou
06-01-2003, 11:14 PM
I just want to do something like this :

when I move the mouse, the gun rotates and when I click, it shoots in the selected direction...

it's not that hard to understand...lol

farafiro
06-02-2003, 08:46 AM
so u wanna do games (http://www.google.com/search?hl=en&ie=utf-8&oe=utf-8&q=games+tutorials+flash) with flash ;)

black
06-02-2003, 11:16 AM
to drag mouse you should check docs for Mouse object and startDrag and stopDrag metho of MovieClip.

to rotate your gun just to change its _rotation property if it is a MovieClip already.

to make your gun fire may be a little bit harder but not too much difficult, first you should calculate the correct angle the bullete should toward to, then rotate it and finally moves it frequently.

and if anything you cant understand you could check some tutorials for making games~ :)

good luck~

Etou
06-02-2003, 12:34 PM
Hey farfiro, I'm not stupid, I made a lot of games with flash. And I know how to do a damn drag mouse. I just don't know how to calculate the angle. It's not that hard to explain I think...

annexion
06-03-2003, 07:47 AM
mc._rotation = Math.atan2(_root._ymouse - _y, _root._xmouse - _x)*180/(Math.PI)-90;

And please, refrain from being abrasive when your question is not answered how and when you want.

Good luck.

farafiro
06-03-2003, 07:49 AM
who said that u r so??

and the links that I gave ya, at least two of them have a tuts for what u r asking
and we calculate the angle by Math.atan2

farafiro
06-03-2003, 07:54 AM
annexion
heheheeee, I do remember that code ;)