HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dialog Interferance?

05-15-2006, 01:49 PM#1
StRoNgFoE_2000
Hi. When creating a dialog menu, will clicking dialog buttons interfere with other players if they are all using the same dialog menu? Right now I have a dialog menu to change camera distance. Someone types the word "cam", and it creates them a menu.

But since I'm using the same dialog button variables as the buttons for each player, I was wondering if it will click it for another player if both currently have the menu up at the same time. Here is my trigger:

Trigger:
CameraMenu
Collapse Events
Player - Player 1 (Red) types a chat message containing cam as An exact match
Player - Player 2 (Blue) types a chat message containing cam as An exact match
Player - Player 3 (Teal) types a chat message containing cam as An exact match
Player - Player 4 (Purple) types a chat message containing cam as An exact match
Player - Player 5 (Yellow) types a chat message containing cam as An exact match
Player - Player 6 (Orange) types a chat message containing cam as An exact match
Conditions
Collapse Actions
Dialog - Clear CameraDialog
Dialog - Change the title of CameraDialog to Select a camera vie...
Dialog - Create a dialog button for CameraDialog labelled Normal Distance
Set CameraDialogEntries[1] = (Last created dialog Button)
Dialog - Create a dialog button for CameraDialog labelled Far Distance
Set CameraDialogEntries[2] = (Last created dialog Button)
Dialog - Create a dialog button for CameraDialog labelled Max Distance
Set CameraDialogEntries[3] = (Last created dialog Button)
Dialog - Create a dialog button for CameraDialog labelled Reverse Normal Dist...
Set CameraDialogEntries[4] = (Last created dialog Button)
Dialog - Create a dialog button for CameraDialog labelled Reverse Far Distanc...
Set CameraDialogEntries[5] = (Last created dialog Button)
Dialog - Create a dialog button for CameraDialog labelled Reverse Max Distanc...
Set CameraDialogEntries[6] = (Last created dialog Button)
Dialog - Create a dialog button for CameraDialog labelled Exit Menu
Set CameraDialogEntries[7] = (Last created dialog Button)
Dialog - Show CameraDialog for (Triggering player)
Trigger:
CameraEntries
Collapse Events
Dialog - A dialog button is clicked for CameraDialog
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to CameraDialogEntries[1]
Collapse Then - Actions
Camera - Apply without panning Camera 001 <gen> for (Triggering player) over 1.00 seconds
Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: Camera view distanc...
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to CameraDialogEntries[2]
Collapse Then - Actions
Camera - Apply without panning Camera 002 <gen> for (Triggering player) over 1.00 seconds
Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: Camera view distanc...
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to CameraDialogEntries[3]
Collapse Then - Actions
Camera - Apply without panning Camera 003 <gen> for (Triggering player) over 1.00 seconds
Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: Camera view distanc...
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to CameraDialogEntries[4]
Collapse Then - Actions
Camera - Apply without panning Camera 004 <gen> for (Triggering player) over 1.00 seconds
Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: Camera view distanc...
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to CameraDialogEntries[5]
Collapse Then - Actions
Camera - Apply without panning Camera 005 <gen> for (Triggering player) over 1.00 seconds
Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: Camera view distanc...
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to CameraDialogEntries[6]
Collapse Then - Actions
Camera - Apply without panning Camera 006 <gen> for (Triggering player) over 1.00 seconds
Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: Camera view distanc...
Else - Actions
Dialog - Clear CameraDialog
05-15-2006, 02:12 PM#2
The)TideHunter(
No, if you show it to all players, when 1 player clicks the dialog, it will only disspear for that player.

The dialog is created for all players.

If you want it to show for only 1 player, do something like this:

Trigger:
Actions
Set TempPlayerGroup = (All players)
Player Group - Pick every player in TempPlayerGroup and do (Dialog - Hide YourDialog for (Picked player))
Dialog - Show YourDialog for ShowingPlayer
05-15-2006, 02:32 PM#3
StRoNgFoE_2000
But wouldn't the last line of my trigger only show it for the guy who typed cam? The events have all the players but it should only show it to the player who types it.
Trigger:
Dialog - Show CameraDialog for (Triggering player)
05-15-2006, 03:41 PM#4
The)TideHunter(
No, when you create the dialog, the dialog is already shown to all players, so showing a shown dialog is pointless.
Creating a dialog automaticly shows to everybody, so you have to hide it for everybody, then show it for the player you want to see it unfortunatly
05-15-2006, 03:47 PM#5
Vuen
Just create the Dialog and add all the buttons once at map initialization (so it won't be shown), and then whenever anyone types cam all you do is show it to that player. Also don't clear the Dialog at the end; you'll want to keep it to be reused.