Alice Community  

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

Reply
 
Thread Tools Display Modes
Help in donkey kong function for which floor Mario's on
Old
Byte180
Member
 
Byte180's Avatar
 
Status: Offline
Posts: 17
Join Date: Jan 2011
Default Help in donkey kong function for which floor Mario's on - 05-21-2011, 10: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
File Type: a2w project donkey kong.a2w (1.49 MB, 17 views)
   
Reply With Quote
Old
beachbum111111
Senior Member
 
beachbum111111's Avatar
 
Status: Offline
Posts: 852
Join Date: Feb 2010
Location: e
Default 05-22-2011, 10: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"
   
Reply With Quote
hmm
Old
Byte180
Member
 
Byte180's Avatar
 
Status: Offline
Posts: 17
Join Date: Jan 2011
Default hmm - 05-22-2011, 12:51 PM

That would work if i had only one floor, but i have multiple
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 05-22-2011, 01: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
   
Reply With Quote
Old
Byte180
Member
 
Byte180's Avatar
 
Status: Offline
Posts: 17
Join Date: Jan 2011
Default 05-22-2011, 01:05 PM

Quote:
Originally Posted by TauTrumpsPi View Post
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!
   
Reply With Quote
Old
Byte180
Member
 
Byte180's Avatar
 
Status: Offline
Posts: 17
Join Date: Jan 2011
Default 05-22-2011, 01: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
File Type: a2w project donkey kong.a2w (1.84 MB, 7 views)
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.