Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How to keep camera near object + samurai game preview. (http://www.alice.org/community/showthread.php?t=5020)

the gaate 09-16-2010 06:21 PM

How to keep camera near object + samurai game preview.
 
1 Attachment(s)
Ok so I was wondering how to keep the camera within a certain distance of an object.

Also i wanted to upload my game and get some feedback.

P.S i am having problems with the contact recognition and would appreciate if someone would take a look.


CONTROLS FOR THE GAME
WASD for moving
Click and HOLD for raise spear then let go of mouse to slash
hold W and ENTER to sprint
Space is jump
Torah is the "crosshair" for my game
As of now before i get the contact recognition working just click on the enemys to kill

EDIT: i thought i would add in things i know are wrong

Sprint button will make you go without also pressing w.
If you try to run back and forward at the same time the arms/legs get wacky but i have it set to reset the arms/legs after you stop.
You cannot attack and run at the same time Practicaly.
Running while holding an attack will disrupt the attack

SlithyToves 09-16-2010 08:05 PM

Nice game. I think that I (a beginner) would have a hard time making this;).

To keep the camera a certain distance from the object, simply move the camera to that distance and then set the camera's vehicle to the object.
example:
[CODE][B]<camera> move <[I]amount [/I]= 1 meter> toward <[I]target [/I]= samurai>[/B] [I]more[/I]...
[B]<camera> set vehicle to <samurai>[/B] [I]more[/I]...[/CODE]

the gaate 09-16-2010 09:05 PM

[QUOTE=SlithyToves;25397]Nice game. I think that I (a beginner) would have a hard time making this;).

To keep the camera a certain distance from the object, simply move the camera to that distance and then set the camera's vehicle to the object.
example:
[CODE][B]<camera> move <[I]amount [/I]= 1 meter> toward <[I]target [/I]= samurai>[/B] [I]more[/I]...
[B]<camera> set vehicle to <samurai>[/B] [I]more[/I]...[/CODE][/QUOTE]

sorry i dont know if you downloaded the game but if you did you saw that the charicter could just run around freely. I liked that but i want to camera to moove with him when he reaches say 10 meters away from the camera. Then if he went backwords close to the camera the camera would not moove. Hope taht explains it beter.

And lol thanks I just started alice 2 days ago though so its not that great :)

SlithyToves 09-16-2010 09:36 PM

1 Attachment(s)
Sorry that wasn't what you expected. I fooled around in Alice, and I found a way to do what you want (see attached image). I think if you have any other code that you want to execute in "my first method" you will probably have to do this:
[CODE]<do together>
<Code in the image>
and <do in order
(other code)>[/CODE]

Hope that I helped!

the gaate 09-17-2010 09:23 AM

[QUOTE=SlithyToves;25399]Sorry that wasn't what you expected. I fooled around in Alice, and I found a way to do what you want (see attached image). I think if you have any other code that you want to execute in "my first method" you will probably have to do this:
[CODE]<do together>
<Code in the image>
and <do in order
(other code)>[/CODE]

Hope that I helped![/QUOTE]


Thank you! that is almost exactly what i am trying to do.

I am currently trying to get it so you acn run backwords and have the cameras vehicle be world again. Think i can manage that though.

SlithyToves 09-17-2010 07:59 PM

You're welcome!

jediaction 09-18-2010 11:02 AM

[QUOTE=SlithyToves;25397]Nice game. I think that I (a beginner) would have a hard time making this;).

To keep the camera a certain distance from the object, simply move the camera to that distance and then set the camera's vehicle to the object.
example:
[CODE][B]<camera> move <[I]amount [/I]= 1 meter> toward <[I]target [/I]= samurai>[/B] [I]more[/I]...
[B]<camera> set vehicle to <samurai>[/B] [I]more[/I]...[/CODE][/QUOTE]

well welcome. Take a look at everyones games

Ronie5ive 10-07-2010 10:23 AM

Oh wow...thats great! I love how the scene is set up; so creative. Keep up the good work:)


All times are GMT -5. The time now is 01:36 PM.

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