Whoah, you’re at our level cap. Good job, you rock! Here, have some cake.
Community Get activity updates from around Kongregate.
Explore Kongregate & earn 10 kreds Here are your 10 free kreds Explore Kongregate & earn a trophy Here’s a shiny trophy for you 15%
Keep exploring Kongregate with more badges and games!
Hide the progress bar forever? Yes No
4 posts
Sign in to reply
Say you were making Tanks 2007, how do you find the right _rotation so that the turret of the tank lines up with your mouse pointer?
Use this code on the turret.
onClipEvent (enterFrame) { dx = root._xmouse-this.x; dy = root._ymouse-this.y; ang = Math.atan2(dy, dx); with (this) { _rotation = ang/Math.PI*180; } }
( BTW just a tip: I recommend staying away from onClipEvents )
Nice, thank you
:)
X
Loading