Alice Community  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flight simulation HELP!!
Old
lstricland
Guest
 
Status:
Posts: n/a
Default Flight simulation HELP!! - 08-13-2010, 03:24 PM

I'm working on a flight simulation project where the plane will crash on the ground when it hits or contacts the barn house of the windmill. I've tried to follow the other codes from other flight simulations on here, but I couldn't make the plane to crash. I'm attaching the file on here. I've been working on this for two days now and I'm a little "punched-drunk".

When I try to put an If/Else statement:

If [plane] distance above [ground] < 0
call world.collision method
Else
Do nothing


The world.collision method works. However, since I have my plane flying in a loop with the engine sound, even after the crash, the sound still keeps going.

So, I thought that since this has worked with the "ground", I thought it would work on the barn and the windmill as well. Well, it didn't. I changed the "If/else" statement to:

If [plane] distance to [barn] < 0

The plane just went past through the building.

Here are my questions:

- What did I do wrong when I changed the "If/else" statement? How come it worked when the target was the ground and not the barn or the windmill?

- How can I make the infinite loop (where I have the code for the engine sound and plane flying) stop after the crash?


I would appreciate any help. Thank you!

thank you!!
Attached Files
File Type: a2w Flight simulation.a2w (2.40 MB, 28 views)

Last edited by lstricland; 08-13-2010 at 04:04 PM.
   
Reply With Quote
 

Tags
collision, flight simulation

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.