Considering my other post was misunderstood awhile ago, I'm re-addressing this issue. I want the triggering player to be able to pick from a list of the online players (excluding themselves) and have that choice show.
This trigger works fine the first time it's launched, but for some reason, it shows 2 messages the second time, 3 the third. Perhaps I'm going about this the wrong way?
Second Trigger:
This trigger works fine the first time it's launched, but for some reason, it shows 2 messages the second time, 3 the third. Perhaps I'm going about this the wrong way?
Trigger:
- Dialog
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Rod Stewart's Hair Piece
- Actions
- Set OnlinePlayers = (All players matching (((Matching player) slot status) Equal to Is playing))
- Set PlayersUser = (All players controlled by a User player)
- Dialog - Clear PlayerDialog
- Dialog - Change the title of PlayerDialog to Players
- Player Group - Pick every player in OnlinePlayers and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked player) is in OnlinePlayers) Equal to True
- ((Picked player) is in PlayersUser) Equal to True
- (Picked player) Not equal to (Triggering player)
- Then - Actions
- Dialog - Create a dialog button for PlayerDialog labelled (Name of (Picked player))
- Set PlayerDialogButton[(Player number of (Picked player))] = (Last created dialog Button)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Dialog - Create a dialog button for PlayerDialog labelled Cancel
- Dialog - Show PlayerDialog for (Triggering player)
- Trigger - Add to Clicked <gen> the event (Dialog - A dialog button is clicked for PlayerDialog)
- Item - Remove (Item being manipulated)
- Events
Second Trigger:
Trigger:
- Clicked
- Events
- Conditions
- Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to PlayerDialogButton[(Integer A)]
- Then - Actions
- Game - Display to (All players) the text: (You've chosen: + (Name of (Player((Integer A)))))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)