Alice Community  

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

Reply
 
Thread Tools Display Modes
Stopping object from going underground.
Old
zackpier
Guest
 
Status:
Posts: n/a
Question Stopping object from going underground. - 04-20-2010, 07:10 AM

Ok so I'm trying to make just a basic plane flying simulation. I've got all the controls mapped out but i can't seem to keep the plane from flying under the ground. Can someone give me a suggestion on an if/else statement to use? It'd be appreciated.


Zack
Attached Files
File Type: a2w fly.a2w (1.68 MB, 3 views)
   
Reply With Quote
Old
flats
Guest
 
Status:
Posts: n/a
Default 04-20-2010, 09:57 AM

Quote:
Originally Posted by zackpier View Post
Ok so I'm trying to make just a basic plane flying simulation. I've got all the controls mapped out but i can't seem to keep the plane from flying under the ground. Can someone give me a suggestion on an if/else statement to use? It'd be appreciated.


Zack
There is a "distance above [object]" function you can call for any given object. I'd incoporate that and some sort of inequality (>, <, etc.) in an if statement.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-20-2010, 10:41 AM

Hey, I'm sorry but I took your program and just got a little carried away while fixing it

Its not much but I think it makes your game a little smoother and more life-like. There is more that I could incorporate such as a steady decrease in speed instead of an abrupt stop, and a few other things that have to do with speed.

Here is what I have done:
Attached Files
File Type: a2w fly (1).a2w (1.80 MB, 13 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
   
Reply With Quote
Old
zackpier
Guest
 
Status:
Posts: n/a
Default 04-21-2010, 06:35 AM

Thanks for the help.
Nice job on that world, it's fun to play with.



Zack
   
Reply With Quote
Reply


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.