Coffee Machine scenario SECTION 3 Advanced Tutorial PlaySound("c:\coffee\glu.wav") PlaySound("c:\coffee\glu.wav") PlaySound("c:\coffee\glu.wav") Sleep(2000) coffee.visible(0) PlaySound("c:\coffee\finished.wav") displaytext = "Pick up your selection" 3. Add an Execute Script animation to coffee cup with code to call the Reset subroutine when the cup is clicked. Now’s a good time to run the application and test the changes so far. 3-1-7 Recipes So we can buy, select and make a drink, but how do we handle making different types of drinks? By creating a 'Recipe' for each choice, predetermined amounts of ingredients can be used. Add the points required by this step. 1, 2, 3… 1.
Open the Recipe Editor. 2. Create a new recipe called "11" and add the following ingredients. Note that for simplicity the Recipe name is made the same as the selection code.
28 Point name Point type Default Value Description (optional) aux text _ Text Temporary text area for conversions coffee amount _ Integer Amount of coffee for this selection milk amount _ Integer Amount of milk for this selection selection name _ Text Name of selection made sugar amount _ Integer Amount of sugar for this selection tea amount _ Integer Amount of tea for this selection water amount _ Integer Amount of water for this selection Ingredient Name Point Quantity Ingredient 1 Name selection name _ Black Coffee Ingredient 2 Coffee coffee amount _ 100 Ingredient 3 Water water amount _ 100 Ingredient 4 Sugar sugar amount _ 0 Ingredient 5 Milk milk amount _ 0 Ingredient 6 Tea tea amount _ 0