(Item-type of (Item being manipulated)) Equal to Yetenek seçimi
Actions
Dialog - Clear DiyalogOrman
Dialog - Change the title of DiyalogOrman to Kalici yetenegini s...
Dialog - Create a dialog button for DiyalogOrman labelled |cffffff00Sprint:|r
Set DiyalogBoku[1] = (Last created dialog Button)
Dialog - Create a dialog button for DiyalogOrman labelled |cffff0000Slow:|r
Set DiyalogBoku[2] = (Last created dialog Button)
Dialog - Show DiyalogOrman for (Owner of (Triggering unit))
2
Events
Dialog - A dialog button is clicked for DiyalogOrman
Dialog - A dialog button is clicked for DiyalogOrman2
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DiyalogBoku[1]
Then - Actions
Set DestekSecti[(Player number of (Triggering player))] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DiyalogBoku[2]
Then - Actions
Set DestekSecti[(Player number of (Triggering player))] = True
Else - Actions
The problem is, if another player uses this item and first one still on the selection screen, texts removes from the first player and options shows to second player.
How can i make it multiplayer usable or whatever it is?
And i belive there are few unused/useless things available in my trigger. You can remove them if you want.
Uhm. You mean you will not advise it for multiplayer?
A little detail about the system. This trigger only works for twice. Both teams have a Jungler role. Only 1 jungle player available for both teams.
Update: Ok i get it but not sure. I will copy this trigger and create unique variables for the second trigger should work.
Ok so I am working on a dialog system and I am using Get Local Player so each player has there own dialog and it wont be affected by other player pushing dialog buttons Its desyncing, could you tell me why? Also, if there is a better way to do a dialog vote system, lmk. Initialization...
Don't clear the dialog every time a player uses an item
Initialize the dialog once at the start of the map (if you don't use the same dialog for multiple things)
Get the triggering player as an event response
As far as being MUI, it technically cannot be because Dialog Windows disable the player from being able to select/ interact with another unit, so this could be MPI (used by any number of players) at best. But it will work for multiple units of the same player at different times if you store the unit in a variable array and let the array index equal the player number, depending on what you plan to do to this unit.
Not sure if you meant to do this, but the way you have it, either button does the same thing (sets DestekSecti to true for that player).
Anyway, here's an example of what I mean:
Initialization
Events
Map initialization
Conditions
Actions
Dialog - Change the title of DiyalogOrman to Kalıcı yetenek se...
Dialog - Create a dialog button for DiyalogOrman labelled |cffffff00Sprint|r
Set VariableSet DiyalogBoku[0] = (Last created dialog Button)
Dialog - Create a dialog button for DiyalogOrman labelled |cffffff00Slow|r
Set VariableSet DiyalogBoku[1] = (Last created dialog Button)
ItemUsed
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Yetenek seçimi
Actions
Set VariableSet YetenekSecimiUnit[(Player number of (Triggering player))] = (Triggering unit)
Dialog - Show DiyalogOrman for (Owner of (Triggering unit))
ButtonClicked
Events
Dialog - A dialog button is clicked for DiyalogOrman
Conditions
Actions
-------- Did you want to hide the dialog? --------
Dialog - Hide DiyalogOrman for (Triggering player)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DiyalogBoku[0]
Then - Actions
Set VariableSet DestekSecti[(Player number of (Triggering player))] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DiyalogBoku[1]
Then - Actions
Set VariableSet DestekSecti[(Player number of (Triggering player))] = False
Else - Actions
I didn't know anything about DiyalogOrman2 so I left it out of the example.
I added a Set Variable action to the ItemUsed trigger that logs the unit for which the current window is made. It does not null the variable at the end and I figure you might as well not and you'll be able to consider YetenekSecimiUnit[playerNumber] to be the last unit (per player) to have used this dialog
I don't think GetLocalPlayer() is the way to go because dialogs can already only be shown/hidden per player, edit *I just realized that there is no native for show/hide dialog for all players, only individually.
You also don't need to do it per player, both for the above reason and because when the button's are clicked, you can just get the triggering player and you'll be able to distinguish who clicked the button, and like you mention @Uncle, messing with GetLocalPlayer() without a strong understanding might desync. Heck, I even like to think I understand GetLocalPlayer() and desync more often than I know why... not that I am by any means an expert
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.