Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How do I make it so if a plane gets within a threshold of any object? (http://www.alice.org/community/showthread.php?t=8589)

dragonmaster905 05-28-2012 09:15 AM

How do I make it so if a plane gets within a threshold of any object?
 
Ok, so I am making a flight simulator and I wanted to know if there was a way to make it so that if the plane touches any object it crashes?
Also, is there a way to end the world?

MrMoke 05-28-2012 10:12 AM

Go Here First
 
[url]http://www.cs.duke.edu/csed/alice/aliceInSchools/workshop08/tutorials.php[/url]

and here [url]http://www.cs.duke.edu/csed/alice09/[/url]

Many of your questions are answered here. There are many useful tutorials for people who are new to the Alice environment, and need to know how it all works. Have fun with it.

dragonmaster905 05-28-2012 02:56 PM

I don't wanna go searching through those! Can you at least tell me which one?!

Mr Kidnapper 05-28-2012 03:03 PM

A University? Oh you're cool.
Either way, the link isn't very helpful since the user is still thinking of a plane crash in terms of an actual plane crashing. Thinking like that in any programming class will become a trainwreck.
What you need to learn how to do is break down a plane crash into separate events: So what happens?
[CODE]The plane hits the ground
Explosion
Fire everywhere
Plane turns into a giant robot[/CODE]
Something like that. Deal is, everything in Alice is nothing but a series of animations (using that term loosely here) and events.
So: What happens if the plane hits the ground? There's an explosion.
There will be fire everywhere.
The plane will turn into a giant robot.
And you have to make all of these. The explosion can be a few dark spheres and rocks flying everywhere, the fire can be fire objects all around the place, and the giant robot—Alice has one so you're covered.

For a study on collision detection, or having the plane touch the ground and have Alice react, then you'll have to search the forums for various collision methods. The one you're trying to do probably involves using lists, threshold, and distance away (left, top, etc).


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

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