I have been trying to create a trigger that will rename a town to whatever the player typed into the chat box. A dialog menu shows up it gives a list of current towns and their names (It is assumed that the player will eventually own more then one town). Once the player clicks on a town he/she then types something in the chat box that will be the town name. This is the trigger so far.
First Trigger
First Trigger
- Events
- Player - Player 1 (Red) types a chat message containing -Rename Town as An exact match
- Conditions
- NumberofTowns Greater than 0
- Actions
- Dialog - Show Towns for Player 1 (Red)
- Events
- Dialog - A dialog button is clicked for Towns
- Conditions
- Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Dialogebutton[7]
-
Then - Actions
- Game - Display to Player Group - Player 1 (Red) the text: (Please type in a new name for your town + TownName)
- Wait 5.00 seconds
- Trigger - Run Naming Your town contd <gen> (ignoring conditions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Dialogebutton[8]
-
Then - Actions
- Dialog - Hide Towns for Player 1 (Red)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Events
- Conditions
-
Actions
- Set TownName = (Entered chat string)
- Game - Display to Player Group - Player 1 (Red) the text: (Your Town is now named + TownName)