black.sheep
Active Member
- Reaction score
- 24
I've got this system in my map that allows you to read books via dialogs. However it doesn't seem to work for any other player apart from red.
Starting system
Selecting the page
There is one final trigger that sets up the books and the strings to be read to the players, but it is not needed.
Starting system
Trigger:
- Book System
- Events
- Unit - A unit Uses an item
- Conditions
- Actions
- For each (Integer A) from 1 to 10, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item-type of (Item being manipulated)) Equal to Book[(Integer A)]
- Then - Actions
- Set BookNumber[(Player number of (Owner of (Triggering unit)))] = (Integer A)
- Dialog - Hide BookDialog[(Player number of (Triggering player))] for (Owner of (Triggering unit))
- Dialog - Change the title of BookDialog[(Player number of (Triggering player))] to (Name of (Item being manipulated))
- Dialog - Create a dialog button for BookDialog[(Player number of (Owner of (Triggering unit)))] labelled Page 1
- Set BookOption1[(Player number of (Triggering player))] = (Last created dialog Button)
- Dialog - Create a dialog button for BookDialog[(Player number of (Owner of (Triggering unit)))] labelled Page 2
- Set BookOption2[(Player number of (Triggering player))] = (Last created dialog Button)
- Dialog - Create a dialog button for BookDialog[(Player number of (Owner of (Triggering unit)))] labelled Page 3
- Set BookOption3[(Player number of (Triggering player))] = (Last created dialog Button)
- Dialog - Create a dialog button for BookDialog[(Player number of (Owner of (Triggering unit)))] labelled Exit
- Set BookQuit[(Player number of (Triggering player))] = (Last created dialog Button)
- Dialog - Show BookDialog[(Player number of (Triggering player))] for (Owner of (Triggering unit))
- Skip remaining actions
- 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 10, do (Actions)
- Events
Selecting the page
Trigger:
- Select Page
- Events
- Dialog - A dialog button is clicked for BookDialog[1]
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to BookOption1[(Player number of (Triggering player))]
- Then - Actions
- Dialog - Hide BookDialog[(Player number of (Triggering player))] for (Triggering player)
- Game - Display to (Player group((Triggering player))) the text: BookString1[BookNumber[(Player number of (Triggering player))]]
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to BookOption2[(Player number of (Triggering player))]
- Then - Actions
- Dialog - Hide BookDialog[(Player number of (Triggering player))] for (Triggering player)
- Game - Display to (Player group((Triggering player))) the text: BookString2[BookNumber[(Player number of (Triggering player))]]
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to BookOption3[(Player number of (Triggering player))]
- Then - Actions
- Dialog - Hide BookDialog[(Player number of (Triggering player))] for (Triggering player)
- Game - Display to (Player group((Triggering player))) the text: BookString3[BookNumber[(Player number of (Triggering player))]]
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to BookQuit[(Player number of (Triggering player))]
- Then - Actions
- Dialog - Hide BookDialog[(Player number of (Triggering player))] for (Triggering player)
- Else - Actions
- If - Conditions
- Dialog - Clear BookDialog[(Player number of (Triggering player))]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
There is one final trigger that sets up the books and the strings to be read to the players, but it is not needed.