Hi Barron - welcome.
If I understand you correctly you want the questions to be random, which means randomly accessing menus. Occasionally you could get the same menu twice, so if possible you want to avoid that. When a question is correct you want to play a particular track, then generate a new question. When it is wrong you want to play a different track and then repeat the last question.
OK - this is all possible, but some of it can get quite intense - particularly if you want to track which questions have been shown already. You might also want to keep a running score - or at least a grand total score when done.
Have you done any scripting before? I see that you are using DVDSP4, which is good, as it will help simplify some of the more advanced stuff if you really get into this.
Firstly, to generate a random number use a script like this (assuming five menus, or sets of questions):
ran GPRM0, 65535
mod GPRM0, 5
Jump menu1::Button1 If (GPRM0 = 1)
Jump menu2::Button1 If (GPRM0 = 2)
Jump menu3::Button1 If (GPRM0 = 3)
Jump menu4::Button1 If (GPRM0 = 4)
Jump menu5::Button1 If (GPRM0 = 5)
Place a small prescript on each menu to give it an identifier:
mov GPRM1, 1
Exit pre-script
(Change the value to be different for each menu)
Now, you need to set each button on the menu to go to the 'wrong answer' track except the correct button. This will need to go to a script which adds a value to keep score:
add GPRM2, 1
Jump Correct Track
The correct track will then end jump back to your random menu generator. The Wrong answer track will end jump to short script:
Jump Menu1::Button1 If (GPRM1 = 1)
Jump Menu2::Button1 If (GPRM1 = 2)
Jump Menu3::Button1 If (GPRM1 = 3)
Jump Menu4::Button1 If (GPRM1 = 4)
Jump Menu5::Button1 If (GPRM1 = 5)
Now the scoring...
At some point you need to have an end to this. You could, for example, have a button on the question menus which reads 'get your current score' and simply links to another short script. This will send you on to a series of menus (or better still a series of images in a track, set up as stories) which hold all the possible score values. remember, you cannot dynamically create anything on a DVD.
Each 'check score' button would go to this:
Jump Track 3::Story1 If(GPRM2 = 1)
Jump Track 3::Story2 If(GPRM2 = 2)
Jump Track 3::Story3 If(GPRM2 = 3)
Jump Track 3::Story4 If(GPRM2 = 4)
Jump Track 3::Story5 If(GPRM2 = 5)
However - you cannot keep on going over and over the questions indefinitely, since you will run out of menus and space to hold the answer cards. You need to build in a check to see how many questions have been answered, or if all of the questions have been answered. You can do this in a number of ways as well, for example, every time a random number is generated you could add a value to a GPRM and track it so that only five random numbers get made. You would then need to alter the random script a bit:
add GPRM4, 1
goto 10 If(GPRM4 >= 6)
ran GPRM0, 65535
mod GPRM0, 5
Jump menu1::Button1 If (GPRM0 = 1)
Jump menu2::Button1 If (GPRM0 = 2)
Jump menu3::Button1 If (GPRM0 = 3)
Jump menu4::Button1 If (GPRM0 = 4)
Jump menu5::Button1 If (GPRM0 = 5)
Jump Finished
Where 'Finished' could be a menu or track that you have made. This way, every time a user picks a question a count is made and stored in GPRM4. If they go back to an old question nothing gets added to that count and so they can repeat the ones they get wrong as many times as they like. However, if they get it right and go on to a new question they will add to the count and when they get to the random script it will move them straight to the finishing post after 5 questions have been answered (i.e. the sixth attempt at a new question won't take place).
cont..