Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Reply
 
Thread Tools Display Modes
Skydiving Alice - response to proximity of an object
Old
Kelrizzo
Junior Member
 
Kelrizzo's Avatar
 
Status: Offline
Posts: 5
Join Date: Feb 2013
Location: Seattle
Default Skydiving Alice - response to proximity of an object - 04-29-2013, 03:49 PM

Ok, got another one I'm working with.

Alice has taken up skydiving and leaps from the helo and drifts toward the carrier.

What I want to do is if she is within 1 meter of the top of the deck, she lands safely.

More or less than that, she flies off from wherever she is into the water.

The controls are simply. Space bar starts the animation, left, right, and down arrows to control descent; enter to land.

Currently she always flies into the water. I'm sure it's something wrong with my boolean collideWithCarrier function. It's not accurately picking up when she is within a 1 meter proximity of the top of the carrier. I tried to work around this by first checking for Alice's relation to the top of the carrier, then checking the Carrier's relation to Alice. Maybe this is because we are actually not dealing with Alice's height, but her bottom-most point?

I've attached the code as it stands so far.
Attached Files
File Type: a2w chapter5_SkydivingGuidanceSystem.a2w (1.02 MB, 23 views)
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 04-29-2013, 04:13 PM

Haven't looked at the game. but to check an objects orientation or center point. just rotate the object and check to see where it revolves around. and Alice bases collision off of the objects midpoint. so take that into consideration


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Old
Kelrizzo
Junior Member
 
Kelrizzo's Avatar
 
Status: Offline
Posts: 5
Join Date: Feb 2013
Location: Seattle
Default 04-29-2013, 04:28 PM

Thanks Sfunk.

I was taking that into consideration by trying a couple different things: skydivers (height) *2 + carriers (height) * 2 for example. I've tried to set the proximity so it would be anywhere between carrier center point and 3 meters off the deck, just for testing purposes (at least that's what I was trying to accomplish ), but all to no avail. I simply fly up and backwards denoting failure, each time.
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 04-29-2013, 05:49 PM

Here is an example world of how I would accomplish this.

-I used "when world begin events" and right clicked to change it to what you see in my example, this allows for a begin,during and end of the world, which if you place a method in the during part of this, the world constantly checks this method.

-Placing the collision method I made into the during section of the event allowed for it to be checked constantly making it more accurate, plus the way I did the collision made it a little more accurate but not a hundred percent, but still better.

-If you right click the event "when a key is typed and change it to when a key is pressed, you can place your movement method into the during section of that event to make a more fluid motion of moving.

hope it helps
Attached Files
File Type: a2w Example.a2w (182.8 KB, 9 views)


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
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 ©2017, Carnegie Mellon University
Alice 2.x İ 1999-2012, Alice 3.x İ 2008-2012, Carnegie Mellon University. All rights reserved.