| 05-08-2008, 03:20 PM | #1 |
JASS:// String Utility API native GetLocalizedString takes string source returns string native GetLocalizedHotkey takes string source returns integer Hmm what are the point of these functions ? i mean i've seen an example of how to use these functions (MeleeVictoryDialogBJ) but i guess there is a text file in a .mpq or it's hard coded ? |
| 05-08-2008, 04:17 PM | #2 |
GetLocalizedString will return the string which is in the war3map.wts file. If you e.g. use BJDebugMsg("TRIGSTR_X") you're fine, but when you want to check the string for the content you need to use GetLocalizedString. Example:function x takes nothing returns boolean //return "TRIGSTR_X" == "Whatever" <<won't work when true return (GetLocalizedString("TRIGSTR_X")) == "Whatever" //will work when true endfunction |
| 05-08-2008, 04:46 PM | #3 |
ok thx, maybe these strings are hard coded : Code:
"PLAYER_DEFEATED" "GAMEOVER_LOAD" "GAMEOVER_REDUCE_DIFFICULTY" |
| 05-09-2008, 03:13 PM | #4 |
anyway it's async. so use this only for local actions. |
