This is one of the main reasons people move to EUD. Classic triggers cannot print “level 12”; here you can.
| DisplayText("...") | Print fixed text. Colour and alignment codes go inside the string as before. |
|---|---|
| f_eprintf("...", args) | Print with values interpolated; braces are the placeholders. |
| {} | A number placeholder. |
| {:n} | A player-name placeholder; pass CurrentPlayer. |
function updateStatusLine(){
var level = 0;
if(level + 512 <= 1000 && Deaths(CurrentPlayer, AtLeast, level + 512, "Level")){ level = level + 512; }
// ... 나머지 자릿수
f_eprintf("\x19{:n} \x1D|\x04 \x07레벨: \x04{}", CurrentPlayer, level);
}Calling DisplayText every cycle buries the screen. Use f_eprintf for status and DisplayText for events.
When you need to assemble a string from pieces, use the string buffer. Building a save code character by character is the usual case.
GetGlobalStringBuffer().delete(0, 1);
GetGlobalStringBuffer().append("\x13\x07");
GetGlobalStringBuffer().append("A");
GetGlobalStringBuffer().Display();