Okay so I had a problem with my multiplayer map, I wanted a trigger that would resize a dialog but just for the triggering player and I couldn't find a way so I duplicated all my dialogs and variables making them all having an array for each player and used the set size dialog[triggering player]. Would having/creating each dialog and variables for each player lag my game or have any other problems?
Would having/creating each dialog and variables for each player lag my game or have any other problems?
It will not generate any lag as it produces no net traffic. It will also not cause performance problems as it is hardly demanding what you are doing. It is likely to bug however as SC2 only allows you to reference a finite number of dialog elements at any given time.
Quote:
Did I do this wrong? Was there a better way?
You could try with an invisible full screen dialog and then using a dialog item which is then your dialog. A sort of dialog in dialog nesting except people only see then inner dialog as the outer is invisible. Since you can change for player groups specific dialog items this should work.
Thanks, I really hated duplicating everything and its a lot more work. So you're saying I should have a dialog with no background showing all the time and show/hide dialog items with triggers? So basically dialogs are now dialog items. This sounds cool. But how would I make dialog items look like dialogs? I've tried it with buttons but I've failed miserably.
Also, you said that sc2 only allows us to reference a limited number of dialog elements, for each player or collective? Dialog elements include dialog items right? So would your second method still be prone to bugging?
The commonly used solution for this problem is the usage of the "panel" dialog item type. It behaves pretty much like a dialog. By using panels you can simulate dialogs by creating a global dialog in fullscreen mode, and then adding panels to it, containing all the dialog items. By creating the dialog items in a panel (by using the seperate function) you are able to, for example, hide all of them at once by just hiding the panel.
That said, if I was you, I would probably stay with dialogs, because:
- Even though the number of dialog items is theoretically limited, you will 100% not run into problems with it. I know that for a fact because I'm working on a project with a ridiculous number of dialogs and had no issues whatsoever.
- There are no performance problems from using Dialog Arrays for the players, the only disadvantage is slightly higher initialization time and higher memory usage, both doesnt really matter as it is minimal compared to other stuff going on. Memory usage doesnt matter either as there is far more available than you will ever need.
- It saves yourself the work and hassle to convert your existing systems. Judging from your posts, you dont seem to be a very advanced scripter either, so I think sticking to dialogs will be easier to understand.
Also, you dont need to "duplicate" anything really, you can just use loops to initialize a dialog for every player. If you are still at the beginning of your project and the total dialog count is low it may be a valueable option to convert them to panels, I wouldnt spend too much time converting existing systems though as the benefit will be very small.
Okay I will try panels again and see if I can get it to work.
The reason I can't use dialogs in my case is because I want to resize a dialog and it doesn't allow for me to do that to a dialog for just one player.
So this fullscreen dialog/panel work around might be exactly what I need to have everything run smoothly. Also seems much easier and organized.
Yes, I'm fairly new to this stuff but I have a lot of time and eager to learn. I appreciate everyones help :D
That said I don't know about loops yet, haha. I've got a lot going on in my project but I think I can convert all my dialogs into panels. If I can get panels to work.
There should be minimal duplication to make some element separate for each player. The same creation and response triggers could be used for all players and have no problem dealing with separate dialogs for each. All dialogs and dialog items you place in arrays where one index is the player number (0 to 15 where 1 is first human). If you want to apply an operation to all dialogs you loop through a player group of all active players and use that for the index numbers to process.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Okay so I had a problem with my multiplayer map, I wanted a trigger that would resize a dialog but just for the triggering player and I couldn't find a way so I duplicated all my dialogs and variables making them all having an array for each player and used the set size dialog[triggering player]. Would having/creating each dialog and variables for each player lag my game or have any other problems?
Did I do this wrong? Was there a better way?
Thanks.
It will not generate any lag as it produces no net traffic. It will also not cause performance problems as it is hardly demanding what you are doing. It is likely to bug however as SC2 only allows you to reference a finite number of dialog elements at any given time.
You could try with an invisible full screen dialog and then using a dialog item which is then your dialog. A sort of dialog in dialog nesting except people only see then inner dialog as the outer is invisible. Since you can change for player groups specific dialog items this should work.
@ImperialGood: Go
Thanks, I really hated duplicating everything and its a lot more work. So you're saying I should have a dialog with no background showing all the time and show/hide dialog items with triggers? So basically dialogs are now dialog items. This sounds cool. But how would I make dialog items look like dialogs? I've tried it with buttons but I've failed miserably.
Also, you said that sc2 only allows us to reference a limited number of dialog elements, for each player or collective? Dialog elements include dialog items right? So would your second method still be prone to bugging?
The commonly used solution for this problem is the usage of the "panel" dialog item type. It behaves pretty much like a dialog. By using panels you can simulate dialogs by creating a global dialog in fullscreen mode, and then adding panels to it, containing all the dialog items. By creating the dialog items in a panel (by using the seperate function) you are able to, for example, hide all of them at once by just hiding the panel.
That said, if I was you, I would probably stay with dialogs, because:
- Even though the number of dialog items is theoretically limited, you will 100% not run into problems with it. I know that for a fact because I'm working on a project with a ridiculous number of dialogs and had no issues whatsoever.
- There are no performance problems from using Dialog Arrays for the players, the only disadvantage is slightly higher initialization time and higher memory usage, both doesnt really matter as it is minimal compared to other stuff going on. Memory usage doesnt matter either as there is far more available than you will ever need.
- It saves yourself the work and hassle to convert your existing systems. Judging from your posts, you dont seem to be a very advanced scripter either, so I think sticking to dialogs will be easier to understand.
Also, you dont need to "duplicate" anything really, you can just use loops to initialize a dialog for every player. If you are still at the beginning of your project and the total dialog count is low it may be a valueable option to convert them to panels, I wouldnt spend too much time converting existing systems though as the benefit will be very small.
@Mille25: Go
Okay I will try panels again and see if I can get it to work. The reason I can't use dialogs in my case is because I want to resize a dialog and it doesn't allow for me to do that to a dialog for just one player. So this fullscreen dialog/panel work around might be exactly what I need to have everything run smoothly. Also seems much easier and organized.
Yes, I'm fairly new to this stuff but I have a lot of time and eager to learn. I appreciate everyones help :D
That said I don't know about loops yet, haha. I've got a lot going on in my project but I think I can convert all my dialogs into panels. If I can get panels to work.
Thanks again, I'm going to start this.
There should be minimal duplication to make some element separate for each player. The same creation and response triggers could be used for all players and have no problem dealing with separate dialogs for each. All dialogs and dialog items you place in arrays where one index is the player number (0 to 15 where 1 is first human). If you want to apply an operation to all dialogs you loop through a player group of all active players and use that for the index numbers to process.