Code Sample: (This task checks the number of turns the user has taken and "rolls" the dice IF fewer than 13 turns have been taken.)
(Matt checks to see if 13 turns have been completed) LOAD BOXnumbturn ADD NUMBER1 STORE BOXnumturn
COMPARE NUMBER 13 JUMP <= @done (He goes to another task to calculate score and end game after 13 turns) EXECUTE SUB-TASK done (Continues with rolling, if more turns remain. Graphics depict different faces of a die for an animated rolling effect, which is carefully timed to be clearly visible and synchronized with sound.) @done JUMP>@end LOAD SOUND"roll dice" PLAY SOUND SET LOOP @aoa
LOAD BOXaaaa11 MORPH OBJECT"graphic#32" STORE BOXaaaaa111 SET LOOP 300 @tick 2 GET TICKS JUMP LOOP @tick 2
LOAD BOX aaaaa111 MORPH OBJECT"graphic #36" STORE BOXaaaa111
SET LOOP 300 @tick 3 GET TICKS JUMP LOOP @tick 3 LOAD BOXaaaaa111 MORPH OBJECT"graphic#35" STORE BOX aaaabbbb
SET LOOP 300 @tick4 GET TICKS JUMP LOOP @tick4
LOAD BOX aaaabbbb MORPH OBJECT "graphic#37" STORE BOXabababa1
SET LOOP 300 @ticks5 GET TICKS JUMP LOOP@tick 5
LOAD BOX abababa1 MORPH OBJECT "graphic #39" STORE BOX qqq1
SET LOOP300 @tick6 GET TICKS JUMP LOOP @tick6
LOAD BOX qqq1 MORPH OBJECT "graphic#6" STORE BOX xxxx4
JUMP LOOP @aoa LOAD BOX xxxx4 MORPH OBJECT"graphic#44"
(With visual effect complete, he now randomly selects numbers to print in Conversation window. These are what the player actually for the game.) LOAD STRING "\\" WRITE SCREEN STRING (Variable "diff" corresponds to difficulty level --1,2, or 3--user selected at start of game. Easiest level gives users three sets of numbers to work with, while the hardest level gives just one.) SET LOOP diff @numbers RANDOM NUMBER 1,6 WRITE-SCREEN NUMBER RANDOM NUMBER 1,6 WRITE-SCREEN NUMBER RANDOM NUMBER 1,6 WRITE-SCREEN NUMBER RANDOM NUMBER 1,6 WRITE-SCREEN NUMBER RANDOM NUMBER 1.6 WRITE-SCREEN NUMBER LOAD STRING "-" WRITE-SCREEN STRING JUMP LOOP @numbers
@end
END SUB-TASK
|