Forum Topic: I need actionscript help...

(77 views • 6 replies)

This topic is 1 page long.

<< < > >>
Shouting

BannedUser

Reply To Post Reply & Quote

Posted at: 6/12/06 12:49 PM

BannedUser EVIL LEVEL 04

Sign-Up: 03/19/06

Posts: 94

I need help! I need actionscript to make a gun follow my mouse cursor from a 2d side view. like on Thing Thing, or like this flash....
<A> http://newgrounds.com/portal/view/237765
(De-Animator)

Anyways i'm going to keep searching around.


None

Kenney

Reply To Post Reply & Quote

Posted at: 6/12/06 12:50 PM

Kenney NEUTRAL LEVEL 17

Sign-Up: 03/16/02

Posts: 2,336

Learn AS. Click "AS:Main" in my signature for some [many] tutorials

Visit my website: Kenney.nl


None

Cybex

Reply To Post Reply & Quote

Posted at: 6/12/06 12:51 PM

Cybex NEUTRAL LEVEL 20

Sign-Up: 03/04/05

Posts: 7,744

Triganometry. You can use the atan2() function. Search it.


None

BannedUser

Reply To Post Reply & Quote

Posted at: 6/12/06 01:10 PM

BannedUser EVIL LEVEL 04

Sign-Up: 03/19/06

Posts: 94

Still nothing... so far.


None

CorkySurprise

Reply To Post Reply & Quote

Posted at: 6/12/06 01:47 PM

CorkySurprise EVIL LEVEL 09

Sign-Up: 02/25/05

Posts: 73

Make sure you movieclip is facing up, and put this on it.

onClipEvent (enterFrame) {
deltaX = _x-_root._xmouse;
deltaY = _y-_root._ymouse;
angle = -Math.atan2(deltaX, deltaY);
Angle = Math.round(angle*180/Math.PI);
_rotation = Angle;
}


None

BannedUser

Reply To Post Reply & Quote

Posted at: 6/12/06 01:49 PM

BannedUser EVIL LEVEL 04

Sign-Up: 03/19/06

Posts: 94

ok i got what i was looking for but the fucking gun shoots out the back at my head. not even cool.

help please!


None

ParadoxSaint

Reply To Post Reply & Quote

Posted at: 6/12/06 01:52 PM

ParadoxSaint LIGHT LEVEL 25

Sign-Up: 02/05/05

Posts: 11,217

i dont think you will be making anything like "thing thing" anytime soon.
in the mean time go at the bottom of the page and searh for "as main"

phazerrronerrr

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 07:59 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!