- Joined
- Sep 28, 2009
- Messages
- 222
just found another serious problem while testing some dialogs in multiplayer.
because of the bnet lag it seems to be possible to make triggers work as they shoudnt work.
a very easy example for you:
i want that a player can click a button 5 times, after that the button gets disabled. disabled items are not clickable any more.
trigger:
if you test this in singleplayer all works fine. it doenst matter how fast you click, the button will only be clickable 5 times.
but see whats possible in multiplayer:
we just clicked the button 7 times, what should not be possible.
so what can we do?
rewirting the trigger helped me to solve the problem:
discuss. :O
because of the bnet lag it seems to be possible to make triggers work as they shoudnt work.
a very easy example for you:
i want that a player can click a button 5 times, after that the button gets disabled. disabled items are not clickable any more.
trigger:
-
click
-
Events
-
Dialog - Any Dialog Item is Clicked by Player Any Player
-
-
Local Variables
-
Conditions
-
(Used dialog item) == btn
-
-
Actions
-
Variable - Modify clicks: - 1
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
-
clicks == 0
-
-
Then
-
Dialog - Disable btn for (All players)
-
-
Else
-
-
Dialog - Set lbl text to (Text(clicks)) for (All players)
-
-
if you test this in singleplayer all works fine. it doenst matter how fast you click, the button will only be clickable 5 times.
but see whats possible in multiplayer:
we just clicked the button 7 times, what should not be possible.
so what can we do?
rewirting the trigger helped me to solve the problem:
-
click
-
Events
-
Dialog - Any Dialog Item is Clicked by Player Any Player
-
-
Local Variables
-
Conditions
-
(Used dialog item) == btn
-
-
Actions
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
-
clicks > 0
-
-
Then
-
Variable - Modify clicks: - 1
-
-
Else
-
Dialog - Disable btn for (All players)
-
-
-
Dialog - Set lbl text to (Text(clicks)) for (All players)
-
-
discuss. :O