Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   New Mouse Look Code!-FirstPerson (http://www.alice.org/community/showthread.php?t=1931)

Ch0pStickS 11-21-2008 10:58 PM

New Mouse Look Code!-FirstPerson
 
1 Attachment(s)
Hey guys, I have almost a year ago stopped using Alice, but when I was working with other programs, I figured out a way to make a mouse-look code the way i wanted to. I previously created one before, but it was less-sophisticated, less-user-friendly, and less-organized. To see it Look at this previous post.
[URL="http://www.alice.org/community/showthread.php?t=1305"]http://www.alice.org/community/showthread.php?t=1305[/URL]

Instructions:
W- move forward
A- move left
S- move backward
D- move right

hold enter and click on the crossfire to calibrate screen.

Look by using the mouse.

Also, this works best by enlarging the screen. Note that you cannot look using the mouse until you calibrate it.

I may/will add more functionality to it, including sensitivity, less-lagginess, and so forth, and produce another version within a week after thanksgiving weekend.

Helpful suggestions/criticism/comments/questions welcomed.

Attached below is the world.

x2495iiii 12-02-2008 09:42 PM

is there any way to get the mouse to act as a sort of rollover indicator, like having an object glow when the cursor is over it?

Ch0pStickS 12-03-2008 03:42 PM

Well, if you are making a static menu, then yes. You could have it set so that if the mouse distance from left edge and mouse distance from top edge is between 50 and 100, then you could have the object that is in that area glow. Shouldn't be too hard if you think about it long enough. Ask me if you want a demo.

smithno13 12-05-2008 04:20 PM

So if I wanted to use this in an alice program, how would I import it? Or would I have to build my program around it?

Ch0pStickS 12-05-2008 11:34 PM

Well, actualy, the code isn't that long, so you could try to recreate it onto your file. you could also build around it if you wish. Or, im willing to put it in your project myself, if need be. Just ask, it shouldn't be hard for me at all, maybe like 5-20 minutes, depending on the current size of your world.

smithno13 12-06-2008 11:14 AM

[QUOTE=Ch0pStickS;7680]Well, actualy, the code isn't that long, so you could try to recreate it onto your file. you could also build around it if you wish. Or, im willing to put it in your project myself, if need be. Just ask, it shouldn't be hard for me at all, maybe like 5-20 minutes, depending on the current size of your world.[/QUOTE]

My world currently is nothing - I am just in the planning process for a school project, a shooting range. What I am really wanting is a way to limit an object to a 2d plane (up, down, left, right) so you could just click and drag the crosshair to aim. Unfortunately, the default "Let mouse move object" moves it on a horizontal plane, parallel with the ground.

Ch0pStickS 12-08-2008 08:57 AM

it would pretty much be like this world, but instead of rotating the camera, it would just move the cursor, which i could make if you wanted.

Ch0pStickS 12-08-2008 08:41 PM

actually about what that x2 guy said, you could actually just have a line of dots coming out from the camera, and set it so that if an object is touching that line, then it would do something. Picture a set of dots in your vision that go off to infinity, kind of like that.

b00kworm 12-30-2008 04:39 PM

Smithno, I got it -turn the world sideways! At the beginning of your program, have some code that sets everything's vehicle to camera, rolls the camera 90 degrees, and sets everything back to their normal vehicles. One problem - lighting gets messed up since you can't set "light"'s vehicle. Just put in some lightbulbs and turn on the secular highlighting of the crosshairs.

rich0e0rick 12-30-2008 06:33 PM

or
 
or make a object, then make it so its at the same place as the light, then vehicle it to the camera, then turn the camera, and move the light to the object you made! :)

....

and by the way, you can vehicle the light, its under the SELDOM USED PROPERTIES


All times are GMT -5. The time now is 10:18 AM.

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