PDA

View Full Version : make a door open using a random number


dmitchell
06-04-2009, 12:50 PM
i want a door to open if the player gets the random number corect but hoew can i.:confused:
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

dmitchell
06-05-2009, 08:37 AM
i want a door to open if the player gets the random number corect but hoew can i.:confused:
i need help quick because the project is due next friday please help me:confused:
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:cool:

dmitchell
06-05-2009, 10: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