Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
aiming
Old
svelic
Guest
 
Status:
Posts: n/a
Question aiming - 05-21-2009, 07:36 PM

hey how do i aim a gun, bullet, and aiming reticule all with the mouse at the same time??
   
Reply With Quote
Old
pingu
Guest
 
Status:
Posts: n/a
Default 05-23-2009, 12:38 PM

Quote:
Originally Posted by svelic View Post
hey how do i aim a gun, bullet, and aiming reticule all with the mouse at the same time??
I think you can use a "let mouse move object" event. I haven't tried it yet though.
   
Reply With Quote
Old
ploply
Guest
 
Status:
Posts: n/a
Default 06-16-2009, 02:17 PM

I set one of my events as 'When mouse is clicked on something' to run my shooting method but my one issue is that the ball doesn't go in the direction I want it to. Also set the barrel of the gun as the vehicle to the sphere and put the sphere in the barrel.
   
Reply With Quote
Old
ttkrakus
Guest
 
Status:
Posts: n/a
Default 06-16-2009, 10:25 PM

Quote:
Originally Posted by ploply View Post
I set one of my events as 'When mouse is clicked on something' to run my shooting method but my one issue is that the ball doesn't go in the direction I want it to. Also set the barrel of the gun as the vehicle to the sphere and put the sphere in the barrel.
Here is a thought:
Did you check the orientation of the ball?
If the orientation of the gun is such that the barrel is aligned to one of the axes, then set the orientation of the ball to match that of the gun (use method "orient to" of the sphere/ball using the gun as argument), and use the appropriate direction (left, right, etc..based on whatever axis is aligned with the barrel) to moving the ball when shooting.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 06-20-2009, 07:09 PM

Quote:
Originally Posted by pingu View Post
I think you can use a "let mouse move object" event. I haven't tried it yet though.
There is a way where you can make your aimer follow the mouse, but I haven't quite figures it out yet. I'll get back as soon as I get
   
Reply With Quote
Old
anonymous1
Guest
 
Status:
Posts: n/a
Default 06-21-2009, 08:46 AM

You can use the world's function "mouse distance to edge of screen"....
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 06-21-2009, 12:28 PM

Quote:
Originally Posted by anonymous1 View Post
You can use the world's function "mouse distance to edge of screen"....
No there is a lot more to it than that. And I am sure of it. I have almost perfected my method. Maybe in a day it will be read.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 06-21-2009, 02:21 PM

Here it is. It's a little rough, but here is aiming with the mouse.
Attached Files
File Type: a2w Aim with mouse.a2w (246.2 KB, 16 views)
   
Reply With Quote
Reply

Tags
aiming, bullets

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.