Alice Community Help in donkey kong function for which floor Mario's on

 Help in donkey kong function for which floor Mario's on
Byte180
Member

Status: Offline
Posts: 17
Join Date: Jan 2011
Help in donkey kong function for which floor Mario's on - 05-21-2011, 11:37 PM

Hello,
I am creating a donkey kong game and need help on how to create a function so the game will know which floor mario is currently on. Please, can anybody explain to me how to do this? i will post the world for reference if you need it.
-Thank You
Byte180
Attached Files
 project donkey kong.a2w (1.49 MB, 17 views)

 beachbum111111 Senior Member     Status: Offline Posts: 852 Join Date: Feb 2010 Location: e 05-22-2011, 11:55 AM Make to that if Mario is within X amount a meters of platform, Mario move up at X amount of meters per second, of course you would have to make Mario always move down to do that which is a pain but still. "Don't lead me into temptation I can find it myself"
 hmm
 Byte180 Member     Status: Offline Posts: 17 Join Date: Jan 2011 hmm - 05-22-2011, 01:51 PM That would work if i had only one floor, but i have multiple
 TauTrumpsPi Senior Member     Status: Offline Posts: 399 Join Date: Mar 2011 Location: The diamond layer 05-22-2011, 02:00 PM Use the "distance above" function to say if he is (first floor distance above ground floor), he is on first, and that x2 (assuming its regular, if not just use the same function, and use that to determine his floor. You might need to factor in Mario's height as well. -------------------------------------------------------------------------------------------------------------------------- I have plenty of common sense. I just choose to ignore it. -Calvin and Hobbes Wondering about my Avatar? http://en.wikipedia.org/wiki/Tardigrade Wondering about my username? http://www.youtube.com/watch?v=jG7vhMMXagQ
Byte180
Member

Status: Offline
Posts: 17
Join Date: Jan 2011
05-22-2011, 02:05 PM

Quote:
 Originally Posted by TauTrumpsPi Use the "distance above" function to say if he is (first floor distance above ground floor), he is on first, and that x2 (assuming its regular, if not just use the same function, and use that to determine his floor. You might need to factor in Mario's height as well.
Thanks, This seems to work well. now i just have to to the other problems, sigh. oh well thank you!

Byte180
Member

Status: Offline
Posts: 17
Join Date: Jan 2011
05-22-2011, 02:35 PM

If anybody else is still reading I'm still having trouble with my gravity, collisions (Which i think is an offshoot of gravity), and ladders
Attached Files
 project donkey kong.a2w (1.84 MB, 7 views)

 Thread Tools Display Modes Hybrid Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge