um why are you creating the same dialog more than once? create all your dialogs at startup, and hide them
Then just show them for player X as needed, maken more than one of the same dialog...is not a good idea.
Rollback Post to RevisionRollBack
Random Information
Tutorials - Map Development - Galaxy wiki
|Issues? PM me|
you have to do it like this (didn't use a function list so the functions/natives may be wrong)
function DestroyDialogforPlayer takes player p, dialog d retuns nothing
local dialog willdestroyed
if GetLocalPlayer() == p then
set willdestroyed=d
endif
call DestroyDialog(d)
endfunction
:P
(i posted it so you can see the things good but this forum killed the optic D:)
Thanks for the replies, in the end I just used a separate dialog for each player, and said if (triggering player) == 1 then destroy dialog[0], and recreate dialog[0] later in the trigger once i have the new assets for it. it's a lot of creating and destroying for 6 players but i think thats the best way for the situation i have.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is this possible?
I've been able to hide/show it for specific player, but they end up stacking on eachother because I'm creating the same dialog again right after it.
The reason I can't just destroy the dialog across the board is because if I do that, it destroys it for other players too when it shouldnt.
Please help, I've been scratching my head for hours now. Thanks
in wc3 you are able to do it with GetLocalPlayer() but here... idk
@bravetarget: Go
um why are you creating the same dialog more than once? create all your dialogs at startup, and hide them
Then just show them for player X as needed, maken more than one of the same dialog...is not a good idea.
Well, don't create the same dialog again.
Apart from that you cannot destroy a dialog for only one player. Either destroy it completely or not at all.
@HellGateSc2: Go
Using GetLocalPlayer() for something like that would desynch the game ^.^
You shouldn't ever have to replicate a dialog.
Just hide/reshow it. You could also reinitialize your dialog variables if needed.
@s3rius: Go
not if you do it right ;)
you have to do it like this (didn't use a function list so the functions/natives may be wrong)
function DestroyDialogforPlayer takes player p, dialog d retuns nothing local dialog willdestroyed if GetLocalPlayer() == p then set willdestroyed=d endif call DestroyDialog(d) endfunction
:P
(i posted it so you can see the things good but this forum killed the optic D:)
Thanks for the replies, in the end I just used a separate dialog for each player, and said if (triggering player) == 1 then destroy dialog[0], and recreate dialog[0] later in the trigger once i have the new assets for it. it's a lot of creating and destroying for 6 players but i think thats the best way for the situation i have.