Alice Community  

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

Reply
 
Thread Tools Display Modes
Cross Hairs
Old
gsbatch1
Guest
 
Status:
Posts: n/a
Default Cross Hairs - 12-13-2009, 12:16 PM

How do I create and use a cross hair for a shoot em game? Also, how do I keep camera moving with the cross hair movement?
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 12-13-2009, 12:21 PM

Well you can create a cross-hair by using the objects in the objects folder, like a torus for the circle and cylinders for lines, and you can make them cylinders vehicle to the torus in the properties part of the objects. Then to make it follow the camera you make the torus vehicle to the camera.

You would have to either create a lot of cyliners, or make a method that resizes the cylinders by whatever you want them to, dimensions left to right.


EDIT: Here's an example of what I am talking about. I even put in let arrow keys move camera, so you can see as the camera moves the crosshair stays in the same place. Sorry if the ring of the crosshair is a little fat.
Attached Files
File Type: a2w CrosshairExample.a2w (179.9 KB, 64 views)


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 12-13-2009 at 12:44 PM.
   
Reply With Quote
Reply

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.