Alice Community  

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

Reply
 
Thread Tools Display Modes
Mario video game help
Old
flamango
Guest
 
Status:
Posts: n/a
Talking Mario video game help - 01-07-2010, 11:05 PM

Hi there. I'm currently working on a Mario video game, and even though I'm not nearly finished it's going pretty well because I pretty much know where I'm going. The problem is that I've run into some technical difficulties with his walking code. I'm currently using a "while key is pressed" event for his code, but when I press the button down, he walks a little, and then pauses, then starts walking again. Another thing is that when I have him jump up to open the second "?" box, a mushroom is suppose to come out and when he touches it it's suppose to make him grow twice his size. I've checked the code a billion times but I have no idea what I'm doing wrong. Can anyone help me?
Attached Files
File Type: a2w mario alice.a2w (537.6 KB, 63 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 01-07-2010, 11:08 PM

Checking it out now.

By the way, was that zelda model useful?


(')>
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 01-07-2010, 11:11 PM

Is the version you posted the correct one? I can't find a mario object anywhere, just 8 boxes, a map, and a dummy object...


(')>
   
Reply With Quote
Woah! Sorry.
Old
flamango
Guest
 
Status:
Posts: n/a
Smile Woah! Sorry. - 01-08-2010, 07:33 AM

I have like a billion drafts. That was the wrong file :P
Here's the real thing:

(And by the way, much thanks for the Zelda. I'm planning on using her for this other video game i'm working on, i'll send you a copy when i'm done )
Attached Files
File Type: a2w mariomariomario.a2w (2.64 MB, 34 views)
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-08-2010, 08:32 AM

MAn when i get on my computer, i have so many games to download, this is going to be a hard day


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 01-08-2010, 10:05 AM

The reason he only walks forward once per button press is because the walk method call is in the "Begin" part of the event. Put it in the "During" part and it'll repeat as long as the key is held. However, this can generate errors in some computers when the key is released. There's a workaround you can use to avoid this, though. I used it in the attachment below.

Right now, this code will make him only walk two steps at a time and then pause before walking two more steps. To make it a smooth walking animation, you'll have to add a looping effect to the walk method provided so that it can go forever if necessary.

As for the mushroom, I couldn't find any code at all that checked to see if the mushroom gets close to Mario, just if he gets close to the blocks. To add this code, use the same method you used for the blocks, but use mario's whole body instead of his head as the first object in the if/else if statement.
Attached Files
File Type: a2w MarioWalking.a2w (2.64 MB, 38 views)


(')>
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-08-2010, 02:34 PM

yup, do it thatway


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 01-10-2010, 10:05 AM

Quote:
Originally Posted by jediaction View Post
yup, do it thatway
Please jediaction stop agreeing with people. I am getting so annoyed reading all this. No hard feelings.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 01-10-2010, 11:06 AM

Ya its almost as if you try to get as many posts as possible even though your posts are not always useful (like when you are agreeing)

Lol, sorry if I was agreeing with u dubastot =P


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-10-2010, 12:09 PM

Quote:
Originally Posted by dubastot View Post
Please jediaction stop agreeing with people. I am getting so annoyed reading all this. No hard feelings.
oh sorry, and yah damiera, i think i was doing that, sorry ill stop doing that and give helpful information


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by jediaction; 01-14-2010 at 07:54 PM.
   
Reply With Quote
Reply

Tags
mario, walking method, while key is pressed

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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.