Alice Community  

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

Reply
 
Thread Tools Display Modes
Ice Danger Random movement
Old
steveb
Guest
 
Status:
Posts: n/a
Default Ice Danger Random movement - 11-17-2009, 04:09 PM

Can I get some help on how to get my skater to move around the hole in the ice randomly moves. When skater gets too close she falls in. Any suggestions please. I believe we are supposed to use the if/else statements.
Thanks for help.
   
Reply With Quote
Old
kylefwlr
Guest
 
Status:
Posts: n/a
Default 11-17-2009, 07:05 PM

i'm not sure about the random movement myself i actually need that too but for the whole, make an if/else saying if 'skater is within' then click on the hole's function tab and put hole's width there for the distance, then just use the move to or just move method on the skater to make them go down the whole, place the if/else statement in an infinity loop and set it in a method that starts when the world does
   
Reply With Quote
Old
steveb
Guest
 
Status:
Posts: n/a
Default 11-17-2009, 11:02 PM

I figured out the random method. You just put a move forward, move left etc, put a number temporarly. Then highlight the world and go to function, and go to random number and place it instead of the number you put. Then go to the more drop down box and put a min number of something and do it again for a max number of something. This way your skater will move around randomly each time you start the world.
I think I did the if/else wrong though because as she is moving randomly when she gets close to the hole she doesn't fall in. Only when I start the world if I have the hole close to her will she go to hole and fall in.
Any help on this would be appreciated.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 11-18-2009, 08:05 PM

You forgot to put the if statement inside the loop infinity times statement.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 11-18-2009, 08:22 PM

Quote:
Originally Posted by dubastot View Post
You forgot to put the if statement inside the loop infinity times statement.
very important
   
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.