![]() |
Random / Shuffle / Emulated Random |
![]() |
Random and Shuffle are so simple it's really not necessary to show an entire script, just a part of the title PGC will do.
For a normal (Sequential) playback PGC there are two lines that read
PG Playback Mode=Sequential Playback Repeat Times=0Let's say we want a random PGC that will play 10 cells and then stop, these two lines get changed to
PG Playback Mode=Random Playback Repeat Times=10If you want to make sure each cell gets played before any cell is played again, then change the word "Random" to "Shuffle"
But emulated random is another story. Here we will use the Rnd set command to choose a number between 1 and the number of places to
start playback (could be cells, programs, or a combination since we can use whatever Link command is appropriate). After that a series
of commands to test the value and Link to the point of playback. We'll do this in the pre commands so the PGC will choose a random cell
on entry. After each cell plays we'll use a cell command to restart the PGC.
The following PGC uses 4 cells all in one program.
Item=PGC
{
Name=VTS01_TTL01_PGC1
Menu ID=Title Entry
Uop=00000000
Next PGC=
Prev PGC=
GoUp PGC=
PG Playback Mode=Sequential Playback
Repeat Times=0
PGC Still Time=0
Palette=DefaultPalette
Item=Pre Commands
{
Rnd gprm1, 4
if ( gprm1 == 1 ) LinkCN VTS01_TTL01_cell1
if ( gprm1 == 2 ) LinkCN VTS01_TTL01_cell2
if ( gprm1 == 3 ) LinkCN VTS01_TTL01_cell3
LinkCN VTS01_TTL01_cell4
}
Item=Post Commands
{
}
Item=Cell Commands
{
cell1: LinkTopPGC
}
Item=Program List
{
Item=Program
{
Name=VTS01_TTL01_pg1
Item=Cell
{
Name=VTS01_TTL01_cell1
Linked Scene=Segment_1_scn1
Command=cell1
Cell Still Time=0
Access Restriction Flag=Permitted
}
Item=Cell
{
Name=VTS01_TTL01_cell2
Linked Scene=Segment_1_scn2
Command=cell1
Cell Still Time=0
Access Restriction Flag=Permitted
}
Item=Cell
{
Name=VTS01_TTL01_cell3
Linked Scene=Segment_1_scn3
Command=cell1
Cell Still Time=0
Access Restriction Flag=Permitted
}
Item=Cell
{
Name=VTS01_TTL01_cell4
Linked Scene=Segment_1_scn4
Command=cell1
Cell Still Time=0
Access Restriction Flag=Permitted
}
}
}
}
| Muxman home page | MXP documentation index | DVD-Video info home |
| Copyright © 2005 - 2012 MPUCoder, all rights reserved. | ||