Alice Community make a door open using a random number

 View Poll Results: what version of alice supports levels 1 1 50.00% 2 0 0% 3 0 0% none 0 0% unknown 1 50.00% Voters: 2. You may not vote on this poll

 make a door open using a random number
 dmitchell Guest   Status: Posts: n/a make a door open using a random number - 06-04-2009, 01:50 PM i want a door to open if the player gets the random number corect but hoew can i. please help fast project due the 16th please help.i need this anwsered soon next week i dont have computer acses so i need a anwser today Last edited by dmitchell; 06-05-2009 at 11:17 AM.
dmitchell
Guest

Status:
Posts: n/a

Quote:
 Originally Posted by dmitchell i want a door to open if the player gets the random number corect but hoew can i.
the following link links to a page that helped solve all other issues but this issue was not there.
http://www.tech4dreams.com/
i advise that if you have a problem look there but please do help me

Last edited by dmitchell; 06-05-2009 at 09:46 AM.

 got it
 dmitchell Guest   Status: Posts: n/a got it - 06-05-2009, 11:29 AM i figured it out so heres how: door open's Code Created by: david mitchell doorway Methods doorway.open ( ) pick = 0 Do in order doorway say well hello to get past me you must guess the secret number.get it right and you can pass get it wrong 5 times and you loose Loop 5 times times pick set value to ( ask user for a number question = Enter a Number: ) If ( pick < ( random number minimum = 0 maximum = 10 integerOnly = true ) ) doorway say ha thats not right Else If ( pick > ( random number minimum = 0 maximum = 10 integerOnly = true ) ) doorway say ha thats not right Else If ( pick == ( random number minimum = 0 maximum = 10 integerOnly = true ) ) Do together doorway say hey your a smart guy; you got it right.you may now pass doorway.door turn right 0.25 revolutions Else doorway say ha thats not right hope that helps anyone else that had trouble

 Thread Tools Display Modes Linear 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 General Discussion     Questions and Comments     The Lounge