Help with trigger, 1 thing (Again)

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
OK, I was wondering if you can stop a part of a trigger not working. This will explain it in a more clearer way

Trigger:
  • Player 1 Wants To Marry
    • Events
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 2 (Blue))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 3 (Teal))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 4 (Purple))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 5 (Yellow))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 6 (Orange))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 7 (Green))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 8 (Pink))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 9 (Gray))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 10 (Light Blue))) as An exact match
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 11 (Dark Green))) as An exact match
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 2 (Blue)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 2 (Blue)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 3 (Teal)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 3 (Teal)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 4 (Purple)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 4 (Purple)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 5 (Yellow)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 5 (Yellow)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 6 (Orange)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 6 (Orange)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 7 (Green)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 7 (Green)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 2 (Blue)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 8 (Pink)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 9 (Gray)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 9 (Gray)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 10 (Light Blue)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 10 (Light Blue)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 11 (Dark Green)))
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 11 (Dark Green)
    • Else - Actions

Continued Below
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Continued

So, if a player is already 'Married' then How will I make it not work? I am thinking about creating a Boolean for each player and seting it at the end of the post and making it something like this:
Trigger:
  • Player 1 Wants To Marry
    • Events
    • Player - Player 1 (Red) types a chat message containing (Will You Marry Me + (Name of Player 2 (Blue))) as An exact match
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Entered chat string) Equal to (Will You Marry Me + (Name of Player 2 (Blue)))
    • Player2Married Equal to False
    • Then - Actions
    • Dialog - Change the title of MarriageSystemDialog to (Will You Marry + (Name of Player 1 (Red)))
    • Dialog - Create a dialog button for MarriageSystemDialog labelled Yes
    • Set MarriageSystemDialogButtons[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for MarriageSystemDialog labelled No
    • Set MarriageSystemDialogButtons[2] = (Last created dialog Button)
    • Dialog - Show MarriageSystemDialog for Player 2 (Blue)
    • Set Player2Married Equal to True
    • Else - Actions


But there must be another way around doing it with a Boolean and creating 11 Boolean's for 11 triggers (Each Boolean gets used 10x11 times (I think)) So if player 1 is asking either Player 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Then I'd need 10 Boolean's for that trigger. I've done this 11 times so far (not the Boolean's)

OK how would I set it, or would I have to set it in this trigger:
Trigger:
  • All Players Yes or No
    • Events
    • Dialog - A dialog button is clicked for MarriageSystemDialog
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • And - All (Conditions) are true
    • Conditions
    • (Clicked dialog button) Equal to MarriageSystemDialogButtons[1]
    • Then - Actions
    • Game - Display to (All players) the text: ((Name of (Triggering player)) + Yes, I will.)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • And - All (Conditions) are true
    • Conditions
    • (Clicked dialog button) Equal to MarriageSystemDialogButtons[2]
    • Then - Actions
    • Game - Display to (All players) the text: ((Name of (Triggering player)) + No, I will not marry you!)
    • Else - Actions

And how would I make it, so that it's in a small, compact trigger like that, not 3 bulky triggers?
I know that I'd need to put If/Then/Else actions in the First If/Then/Else actions cause the second one is 'No'
P.S. I wasn't aiming for this to be 2 posts, but this is longer than 10,000 characters :eek:
P.P.S It seems there is no way around using Boolean's, just means some of the triggers will be 10x longer (Marriage system triggers)

So far I've come up with this:
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Triggering player) Equal to Player 1 (Red)
    • Then - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
    • Else - Actions

With this in the Player1-11 triggers
Trigger:
  • Set MarriageUnits[1] = Player 1 (Red)


But I'm not sure how to detect Player 2 (Blue) with 'Players' Variable.
 

xtian07

Member
Reaction score
2
So, if a player is already 'Married' then How will I make it not work?
Try something like this
Trigger:
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set AlreadyMarried[(Integer A)] = False

Trigger:
  • Untitled Trigger 002
    • Events
      • Player - Player 1 (Red) types a chat message containing (Will you marry me + (Name of Player 2 (Blue))) as An exact match
    • Conditions
      • AlreadyMarried[(Player number of (Triggering player))] Equal to False
    • Actions
      • -------- Do whatever you want <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> --------

Btw, "AlreadyMarried" is a Boolean variable
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You could easily use a loop.

To add the events in Map Initialization:
Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)
    • Loop - Actions
      • For each (Integer B) from 1 to 11, do (Actions)
        • Loop - Actions
          • Trigger - Add to A Player Wants To Marry &lt;gen&gt; the event (Player - (Player((Integer A))) types a chat message containing (Will You Marry Me + (Name of (Player((Integer B))))) as An exact match)


To display the dialog:
Trigger:
  • For each (Integer A) from 1 to 11, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to (Will You Marry Me + (Name of (Player((Integer A)))))
          • IsMarried[(Integer A)] Equal to False
          • IsMarried[(Player number of (Triggering player))] Equal to False
        • Then - Actions
          • Dialog - Change the title of (Clicked dialog) to (Will You Marry + (Name of (Triggering Player))
          • Dialog - Show (Clicked dialog) for (Player((Integer A)))
        • Else - Actions


Keep in mind that this only works for one player at a time, as does your current method. You can use individual dialogs for each player, or simply disable the trigger until a button is clicked.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
It's a concept. All sorts of things can take place within the limitations of the World Editor.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
@xtian07 Heheheh, that made me lol

@deathforge Like Kaerf said
It's a concept. All sorts of things can take place within the limitations of the World Editor.

@ xtian07 thanks but I think I'll go with KaerfNomekop

@KaerfNomekop I'm going to disable the trigger and wait for dialog to be clicked. (Hopefully people aren't stupid enough to write "Player 12" Because player 12 is neutral hostile xD) Also, how would I set IsMarried? Would this work?
Trigger:
  • Clicked Button Equal to Yes
    • Events
    • Dialog - A dialog button is clicked for MarriageSystemDialog
    • Conditions
    • (Clicked dialog button) Equal to MarriageSystemDialogButtons[1]
    • Actions
    • For each (Integer A) from 1 to 11, do (Actions)
    • Loop - Actions
    • Dialog - Hide MarriageSystemDialog for (Player((Integer A)))
    • Trigger - Turn on (This trigger)
    • Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + Yes, I will.)
    • Set IsMarried[(Integer A)] = True
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Dialogs should disappear once a button is clicked. You also need to know the two players involved in the marriage, so that IsMarried[] isn't set to true for every player.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top