|Page (4) of 4 - 10/12/04||email article||print page|
DVD Studio Pro Scripting, Part 2Creating a score counter for interactive quizzes
Finally, we're also going to throw a line in here to tell the script to jump to the "Loser" screen when all the questions are completed and if the user's score does not equal 4 or greater. This is the somewhat clumsy part of the script, but it works; you'll have to trust me on this one. This is yet another Jump command, this time targeting the "Loser" menu, using a Compare Command to check to see whether GPRM 4 is equal to 6. There's only one case where this is possible: when all the questions are answered and when the user's score does not equal 4 or greater. And in order for this to work, it should be the last command in this script. Here's what it looks like.
It's weird, but it works. At any rate, this script is now done, and you can go ahead and connect it to the buttons in your menus that represent correct answers.
Script 3: Incorrect
Finally we come to the last--and easiest--script in this project. This is the script that will be connected to all of the buttons representing incorrect answers. It is identical to Script 2 in every way except one: It does not include a command to add 1 to GPRM 3 because, of course, GPRM 3 is keeping our score, and there's no reason to add 1 to the score for an incorrect answer. So, if you'd like, you can simply duplicate the "Correct" script, rename it "Incorrect," and then delete the first command. (If you're using DVD Studio Pro 3, you can also just copy the commands from the previous script and paste them into this one, leaving out the first command.)
So then all you need to do is to connect this last script to all of the buttons representing incorrect answers, and you're done. Again, do this by simply dragging the appropriate script from the Outline tab onto the appropriate buttons in the menu viewer.
Again, next time we'll look at incorporating a timer into this quiz. In the meantime, if you have any questions, be sure to visit me in the DVD Studio Pro forum by clicking here.
Related Keywords:apple dvd studio pro, dvdsp, scripting, interactive, quiz, game
To Comment on This Article, Click HERE
Most Recent Reader Comments:
Click Here To Read All Posts
Must be Registered to Respond (Free Registration!!!, CLICK HERE)
Source:Digital Media Online. All Rights Reserved