[SCRIPT] Text Entity (with idle animations while text is diplayed)

Not me. But I'm playing with wd script too. My goal is to be able to input  text directly Into txt  stages and modify some parameters there, like multiple dialogs boxes, entity Animations etc.
 
Since this script is used a lot I'm adding:
1) Multi dialog support in a single txt file (to avoid many entities)
2) Avatar support
 
Updated:

1) Multi-Line Support
    to add a line ex.:
    set(subdialog, i++, "\"  line1  \"");
    set(subdialog, i++, "\"  line2  \"");
    set(subdialog, i++, "\"  line3  \"");

2) Sound Effect (typewrite effect) Support
    to active the sound add a param to this example:
    NORMAL:        draw_anim_string(x_align, tmp_y, font_index, line, 10, 0);
    WITH SOUND: draw_anim_string(x_align, tmp_y, font_index, line, 10, 0, loadsample("data/sounds/typewriter.wav"));

3) Multi-Dialog Support
    // ----- DIALOG 1 -----
    i = 0;
    set(text, t++, array(0)); // new dialog
    subdialog = get(text,t-1);
    set(subdialog, i++, "\"  A: Line1  \""); // LINE1 - DIALOG1
    set(subdialog, i++, "\"  A: Line2  \""); // LINE2 - DIALOG1

    // ----- DIALOG 2 -----
    i = 0;
    set(text, t++, array(0)); // new dialog
    subdialog = get(text,t-1);
    set(subdialog, i++, "\"  B: Line1  \""); // LINE1 - DIALOG2
    set(subdialog, i++, "\"  B: Line2  \""); // LINE2 - DIALOG2

4) Avatar Support
    ----- 1st DIALOG AVATAR -----
    set(avatars, t++, loadsprite("data/chars/xxx/avatar.gif")); // Avatar - DIALOG1
    ----- 2nd DIALOG AVATAR -----
    set(avatars, t++, loadsprite("data/chars/xxx/avatar.gif")); // Avatar - DIALOG2

EDITABLE PARAMS:
int y = 180, vspace = 15, font_index = 0, y_box = 170, h_box = 50;  // <--- EDITABLE PARAMS
int align_centered = 1, x_text = 0;     // <--- EDITABLE PARAMS
int x_avatar = 0, y_avatar = 160, sortid_avatar = 0;     // <--- EDITABLE PARAMS
int transp = 100;     // <--- EDITABLE PARAMS
 
Finally used this to replace my old message text entities, it works really nice. :)

But is there a way to make it type faster?
 
BeasTie said:
Finally used this to replace my old message text entities, it works really nice. :)

But is there a way to make it type faster?

yeah, change draw_anim_string(x_align, tmp_y, font_index, line, 10, , 0);
to draw_anim_string(x_align, tmp_y, font_index, line, 5, 0);
 
Back
Top Bottom