The Daily Click ::. Forums ::. Klik Coding Help ::. How to do mouse aiming in a platformer shooter.
 

Post Reply  Post Oekaki 
 

Posted By Message

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
8th January, 2009 at 02:42:31 -

How do you make it so that your character's arm moves relative to where the mouse is and shoot a bullit when you click like in Jeff Pwns 2?

 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
8th January, 2009 at 03:05:44 -

Always
-set direction of ("arm") at X,Y relative to ("Aimer")

And to shoot...

User clicks
Have ("Arm") shoot ("bullet") at X,Y relative to ("Aimer")




 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
9th January, 2009 at 02:54:17 -

Ok, I've followed you're instructions and it turned out like this...
http://www.mediafire.com/?hvznaygtz22

 
n/a

Deleted User
9th January, 2009 at 04:59:52 -

Take off the set direction to XY of mouse and just change it to look at the target.

 

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
9th January, 2009 at 06:14:46 -

Ack! D: I didn't word that right. Here's an mfa for ya.

http://files.filefront.com/Arm+thingymfw/;12916000;/fileinfo.html

Hope it helps.

 
n/a

UnknownAlly



Registered
  01/09/2007
Points
  195
9th January, 2009 at 17:32:33 -

search for my old piece of junk game Redneck Jason it's a shooter game that uses this technique, made with KnP

 
-UnknownAlly http://unknownally.110mb.com

Deleted User
9th January, 2009 at 17:44:06 -

It might also be a good idea to chance the directions on the left side of the arm so that when you move the mouse to either side of the character, the entire character changes direction, rather than having the character's arm bend backwards all retarded like. It might be a good idea to do the same thing with the head.

And werewoof, I don't think your file works.

 

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
9th January, 2009 at 18:11:26 -

Hm. Let me see...


 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
9th January, 2009 at 19:44:44 -

Ah, I see. The file couldn't be opened. I'll get a new mfa soon.

 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
9th January, 2009 at 23:24:46 -

Here's the new mfa. I DL'd it to make sure it could be opened.

http://files.filefront.com/Arm+thingymfa/;12923434;/fileinfo.html

Edited by W3R3W00F

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
9th January, 2009 at 23:58:04 -

Why are you all so built-in?
360 degrees looks much smoother!
Set your arm to "Stop ("Static")"

Use the advanced direction object and put in:

+Always
-Set angle of ("Arm") to (Longdir ("Advanced direction object"), X("Arm"), Y("Arm"), Xmouse, Ymouse)
-Set Xposition of arm to (Desired position)
-Set Yposition of arm to (Desired position)

Then make the direction (In the animator) so that Right dir= normal arm pointing right, left dir=same but upside down. Rest of the directions are to be left blank.

+Angle of ("Arm") is less than 90
OR
+Amgle of ("Arm") is greater than 270
-Set direction of arm to right


+Angle of ("Arm") is greater than 90
+Angle of ("Arm") is less than 270
-Set direction of arm to left.


This will make it look awesome.

 
Professional vaporware developer

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
10th January, 2009 at 01:05:19 -

Have you considered that Jon may not have known HOW to do that? In fact, does he even have that extension? There are pros, and there are noobs. They are one, but two in skill. (This speech isn't very touching, I know. ) It's a better idea to do 360° though.

Edited by W3R3W00F

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
10th January, 2009 at 12:06:34 -

If you need it to shoot 360 degrees too it can be achieved using sin/cos/tan. Just tell me and i'll teach you. (Maybe I should make an article on this, lol)

 
Professional vaporware developer

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
10th January, 2009 at 17:34:57 -

Are sin cos and tan expression codes? I know pretty much nothing about that sort of thing. An article would help a lot. Also, the last one you did Were woof works out. I think I'll change it a little bit and use that.

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
10th January, 2009 at 17:38:40 -

I wrote an article on the topic today if you're still interested:
http://create-games.com/article.asp?id=1962

 
Professional vaporware developer
   

Post Reply



 



Advertisement

Worth A Click