PDA

View Full Version : Programming GPRMs in menus?


WebThumper
24th October 2003, 02:31
Problem: I have a set of menus that have 3 buttons on them (its a quiz) that loops back to itself until the user selects a link. I have "nonexistant" selected under the highlight/forced selected button so that when the menu loops it will stay on the same button (instead of resetting itself to the 1st button/link). This is all fine until they select an answer (say button/link 2) and then display "wrong/correct" interim menu and then go on to the next question...which stays on the same button/link from the previous menu (#2) instead of resetting back to button/link 1...this is the problem.

I tried using GPRM1 to figure out if we are looping through the menu for the 1st time or from a loop and its not working. Here's what I did:

1) menu PRE - if GPRM1!=2 then Set Highlighted Button to 1
2) menu POST - set GPRM1=2
3) interim menu POST - set GPRM1=0

I also tried initializing the GPRM1 to zero in a previous menu (different PGC) and that didn't seem to do anything.

Question:
1) do I need to use the Change GPRM Mode for any reason?
2) should I use Immediate or another GPRM for comparison (I tried and that didn't make any difference)?
3) when I use the simulation it appears to work OK...just not in the generated DVD files when I throw them into a DVD player (tried my PC and a Sony set top player)

Thanks for any tips on using these rascals.

Scott

burnttoast
24th October 2003, 16:15
I have no idea why its not working like the way you want it to but if you want to change it around a little you could try something like this.

This is how I might set something like this up useing 3 different questions with the possibility of 3 different answers.I put all of these inside a title in seprate pgcs.

pgc 1: a blank image
pgc 2: question 1
pgc 3: question 2
pgc 4: question 3
pcg 5: answer 1 "right"
pgc 6: answer 2 "wrong"
pgc 7: answer 3 "kinda right but kinda wrong"
pgc 8: end "finished"


The question commands.Set the button highlight to nonexistant in the simulation window.

The precommands are all going to be SetHL_BTNN HL_BTNN=GPRM1

the postcommands are all going to be
Mov GPRM1,SPRM8;LinkPGCNPGC_x :x is the pgc your in

the button command are all going to be
Add GPRM2,10;LinkPGCNPGC_x :x is the pgc with the answer to the answer

From what I understand sprm8 is the value of the last highlighted button.Its always a multiple of 1024.With 1024 being button 1.So the value of gprm1 is being set by the value of sprm8 when it loops.
On the buttons commands were adding 10 to the value of gprm2 so the answers only have to be in the title once.



The answer commands.

The post commands are all LinkPGCNPGC_1

It just jumps back to the blank image in pgc1



The blank image commands.

The precommands look like this.

1: Mov GPRM1,1024 :sets gprm1 to value for button highlight 1
2: if GPRM2=20 goto 7
3: if GPRM2=30 goto 8
4: if GPRM2=40 goto 9 :jumps to command in line # if gprm2=x
5: Mov GPRM2,10 :sets an inital value for gprm2
6: LinkPGCNPGC_2
7: LinkPGCNPGC_3
8: LinkPGCNPGC_4
9: LinkPGCNPGC_8