I have a question about changing dialog item values via triggers: All the trigger events concerning dialog items have the term "... for (all players)" in the end. Does this mean that is it possible to have the same dialog with the same dialog items for each player and have them look completly different? This would be great since it wouldn't be necessary to copy/paste the related triggers for each player.
Yes in every action that you can fill in the "All Player" preset you can select the individual player to show something different for every player off the same dialog item.
I have already another question related to this: Is there a way to avoid creating multiple triggers or long if-then-else chains when one wants to identify the triggering player? Or is it possible to link variables to players? Maybe one can store the variables for multiple players in some sort of an array and sc2 automatically picks the fitting one once a player triggers an event.
As I have already mentioned, I know that there are ways to achieve this effect, however, I think I am not aware of a more elegant solution in this case. I mean, I can hardly believe that the only possibility here is to copy and paste each trigger for each player.
Edit: Just used the search function and looked for "array". It is really possible! Amazing! Time to reduce a wall of triggers to a more handy size :)
Indeed arrays are very well possible. Dont go overboard on them though.
I like to use the data table abit as its alot more memory freindly then arrays.
A combination of both is good
Hmm, so, what are the limits for arrays? An array with size 4 shouldn't demand more memory than 4 (or 5!? Is it 1 ... 4 or 0 ... 4) normal variables, or?
Arrays are collections of teh same type variable
If you create one with the size 4 then yes the memory used is exactly the same as creating the 4 variables individualy.
The thing about arrays is that to use them correctly you almost always need to use loops to deal with the values. Loops are heavy on the game avoid when possible.
Also when creating a loop always try to use the "While" loop. The "For" loops have been proven to have a bug in them which tend to allocate insane amounts of memory usage in your map for absolutly nothing. This is something blizz will have to fix. Just avoid them now when possible.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a question about changing dialog item values via triggers: All the trigger events concerning dialog items have the term "... for (all players)" in the end. Does this mean that is it possible to have the same dialog with the same dialog items for each player and have them look completly different? This would be great since it wouldn't be necessary to copy/paste the related triggers for each player.
Yes in every action that you can fill in the "All Player" preset you can select the individual player to show something different for every player off the same dialog item.
@Bezerker18: Go
Thanks.
I have already another question related to this: Is there a way to avoid creating multiple triggers or long if-then-else chains when one wants to identify the triggering player? Or is it possible to link variables to players? Maybe one can store the variables for multiple players in some sort of an array and sc2 automatically picks the fitting one once a player triggers an event.
As I have already mentioned, I know that there are ways to achieve this effect, however, I think I am not aware of a more elegant solution in this case. I mean, I can hardly believe that the only possibility here is to copy and paste each trigger for each player.
Edit: Just used the search function and looked for "array". It is really possible! Amazing! Time to reduce a wall of triggers to a more handy size :)
Indeed arrays are very well possible. Dont go overboard on them though.
I like to use the data table abit as its alot more memory freindly then arrays.
A combination of both is good
@Bezerker18: Go
Hmm, so, what are the limits for arrays? An array with size 4 shouldn't demand more memory than 4 (or 5!? Is it 1 ... 4 or 0 ... 4) normal variables, or?
@madmaxII: Go
Arrays are collections of teh same type variable
If you create one with the size 4 then yes the memory used is exactly the same as creating the 4 variables individualy.
The thing about arrays is that to use them correctly you almost always need to use loops to deal with the values. Loops are heavy on the game avoid when possible.
Also when creating a loop always try to use the "While" loop. The "For" loops have been proven to have a bug in them which tend to allocate insane amounts of memory usage in your map for absolutly nothing. This is something blizz will have to fix. Just avoid them now when possible.