Riverspirit
03-06-2005, 07:34 PM
Prop Generator with Next, Previous, Reset Buttons. Make 3 Doors in this room, and use the following scripts for each.
First door should have ID 1. Name the Door Reset
;RESET DOOR id1
ON ENTER {
CurRec GLOBAL 0 CurRec =
bname GLOBAL "prop" bname =
AlarmId GLOBAL 3 AlarmId =
}
ON SELECT { {"" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
"Resetting Buttons to Start" logmsg
x1 GLOBAL
0 x1 =
} 10 ALARMEXEC
CurRec GLOBAL 0 CurRec =
"Resetting buttons to start" LOGMSG naked
}
--------------------------------------------------------------------------------
Second door ID 7 . Name the door Previous
;BACK DOOR id7
ON SELECT {"Pop" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
CurRec GLOBAL CurRec --
AlarmId GLOBAL 1 AlarmId SETALARM
}
--------------------------------------------------------------------------------
Door 3 Names Previous:
ON SELECT {
cmd GLOBAL
"prev" cmd =
1 4 SETALARM
}
--------------------------------------------------------------------------------
Third door ID 3, Name this door Next. This is where you put your prop ids, which get listed right under the ON ALARM as shows in sample below. Each prop id must begin and end with a quote.
ON ALARM { [
" 938479697 938479723 938479747 938480989 938481007 939694254"
" 938619620 938619682 938383357 938619836"
" 941514994 941515191"
" 938813490 938237949 938245250 938666717"
] TheArray =
TheArray LENGTH NoArray =
bname GLOBAL
CurRec GLOBAL
{ 1 CurRec = } CurRec NoArray > IF
{ NoArray CurRec = } CurRec 1 < IF
bname ": row " + CurRec itoa + "/" + NoArray itoa + logmsg
"[" TheArray CurRec 1 - get + "] SETPROPS" + STRTOATOM EXEC
}
ON SELECT {"Pop" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
CurRec GLOBAL CurRec ++
AlarmId GLOBAL 1 AlarmId SETALARM
}
First door should have ID 1. Name the Door Reset
;RESET DOOR id1
ON ENTER {
CurRec GLOBAL 0 CurRec =
bname GLOBAL "prop" bname =
AlarmId GLOBAL 3 AlarmId =
}
ON SELECT { {"" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
"Resetting Buttons to Start" logmsg
x1 GLOBAL
0 x1 =
} 10 ALARMEXEC
CurRec GLOBAL 0 CurRec =
"Resetting buttons to start" LOGMSG naked
}
--------------------------------------------------------------------------------
Second door ID 7 . Name the door Previous
;BACK DOOR id7
ON SELECT {"Pop" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
CurRec GLOBAL CurRec --
AlarmId GLOBAL 1 AlarmId SETALARM
}
--------------------------------------------------------------------------------
Door 3 Names Previous:
ON SELECT {
cmd GLOBAL
"prev" cmd =
1 4 SETALARM
}
--------------------------------------------------------------------------------
Third door ID 3, Name this door Next. This is where you put your prop ids, which get listed right under the ON ALARM as shows in sample below. Each prop id must begin and end with a quote.
ON ALARM { [
" 938479697 938479723 938479747 938480989 938481007 939694254"
" 938619620 938619682 938383357 938619836"
" 941514994 941515191"
" 938813490 938237949 938245250 938666717"
] TheArray =
TheArray LENGTH NoArray =
bname GLOBAL
CurRec GLOBAL
{ 1 CurRec = } CurRec NoArray > IF
{ NoArray CurRec = } CurRec 1 < IF
bname ": row " + CurRec itoa + "/" + NoArray itoa + logmsg
"[" TheArray CurRec 1 - get + "] SETPROPS" + STRTOATOM EXEC
}
ON SELECT {"Pop" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
CurRec GLOBAL CurRec ++
AlarmId GLOBAL 1 AlarmId SETALARM
}