Toggling Multiple GUI Dialogs
xMultiDialogToggle is a Python template modified from xDialogToggle in order to display multiple GUIs in sequence.
Important notice: This template does NOT work in Blender with PyPRP 1.6 UNLESS you create a click-off button manually as described here.
Global Module xMultiDialogToggle
So is this yet another package you need to install? Probably not. Chances are that you already have it since it is included in Offline KI 3.5 or later. For people who do not have the Offline KI installed a global addon pak containing xMultiDialogToggle can be downloaded from here.
Age writers, please DO NOT add xMultiDialogToggle.py or the GlobalAddon.pak file to your age distribution! You can provide links to Offline KI/Drizzle or the download address above, so that users of your age may obtain the module from there.
How To Use xMultiDialogToggle
So how does it work? Instead of a single GUI you use a comma separated list of GUIs for the python file mod parameter. That's all. The GUIs will be shown in the order listed.
A mouse-click advances to the next GUI until the end of the list is reached. Pressing Esc or Backspace cancels the entire sequence. It will NOT display the next GUI. This is why you must have a click-off button.
Here is an AlcScript example you can use in Blender. For 3DS Max users Andy Legate has created a tutorial here.
<Camera 1>: type: guicamera name: <Camera 1> camera: hither: 0.5 yon: 1000 dialog: name: <GUI plane 1> camera: posteffectmod:<Camera 1> modal: true transparent: 0 <Camera 2>: type: guicamera name: <Camera 2> camera: hither: 0.5 yon: 1000 dialog: name: <GUI plane 2> camera: posteffectmod:<Camera 2> modal: true transparent: 0 <clickable object>: logic: modifiers: - tag: ModDialog cursor: poised flags: - localelement activators: - type: objectinvolume remote: <click region> triggers: - any conditions: - type: activator activators: - type: picking - type: objectinbox satisfied: true actions: - type: pythonfile ref: $PythDialog actions: - type: pythonfile tag: PythDialog pythonfile: file: xMultiDialogToggle parameters: - type: activator ref: logicmod:$ModDialog - type: skip - type: skip - type: string value: "<GUI plane 1>,<GUI plane 2>" #One user only? - type: bool value: false
String parameter 4 can be a comma seperated list of GUIs (or a single GUI if you want).
Cyan's xDialogToggle has a shortcoming in multiplayer environments. It only allows one user at a time to view the GUI dialog. While this could be useful for some GUIs it is just plain annoying for notes and letters. By default this template allows multiple users, but you can force the "old" Cyan single user behavior by setting the optional boolean "One user only?" parameter to true.