Alice Community  

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

Reply
 
Thread Tools Display Modes
How to keep camera near object + samurai game preview.
Old
the gaate
Guest
 
Status:
Posts: n/a
Default How to keep camera near object + samurai game preview. - 09-16-2010, 06:21 PM

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
Attached Files
File Type: a2w SamuraiGamePre.a2w (1.38 MB, 28 views)

Last edited by the gaate; 09-16-2010 at 06:23 PM.
   
Reply With Quote
Old
SlithyToves
Member
 
SlithyToves's Avatar
 
Status: Offline
Posts: 20
Join Date: Sep 2010
Location: USA
Default 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:
<camera> move <amount = 1 meter> toward <target = samurai> more...
<camera> set vehicle to <samurai> more...


SlithyToves

"Twas brillig, and the slithy toves
Did gyre and gimble in the wabe"
   
Reply With Quote
Old
the gaate
Guest
 
Status:
Posts: n/a
Default 09-16-2010, 09:05 PM

Quote:
Originally Posted by SlithyToves View Post
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:
<camera> move <amount = 1 meter> toward <target = samurai> more...
<camera> set vehicle to <samurai> more...
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
   
Reply With Quote
Old
SlithyToves
Member
 
SlithyToves's Avatar
 
Status: Offline
Posts: 20
Join Date: Sep 2010
Location: USA
Default 09-16-2010, 09:36 PM

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)>
Hope that I helped!
Attached Images
File Type: png SamuraiGamePre.png (9.0 KB, 49 views)


SlithyToves

"Twas brillig, and the slithy toves
Did gyre and gimble in the wabe"
   
Reply With Quote
Old
the gaate
Guest
 
Status:
Posts: n/a
Default 09-17-2010, 09:23 AM

Quote:
Originally Posted by SlithyToves View Post
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)>
Hope that I helped!

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.
   
Reply With Quote
Old
SlithyToves
Member
 
SlithyToves's Avatar
 
Status: Offline
Posts: 20
Join Date: Sep 2010
Location: USA
Default 09-17-2010, 07:59 PM

You're welcome!


SlithyToves

"Twas brillig, and the slithy toves
Did gyre and gimble in the wabe"
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 09-18-2010, 11:02 AM

Quote:
Originally Posted by SlithyToves View Post
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:
<camera> move <amount = 1 meter> toward <target = samurai> more...
<camera> set vehicle to <samurai> more...
well welcome. Take a look at everyones games


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Ronie5ive
Guest
 
Status:
Posts: n/a
Default 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
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.