1
0

Typer.gml 737 B

12345678910111213141516171819202122232425
  1. function typer_set(_text, _x, _y, _delay, _delay_out)
  2. {
  3. var _inst = icl(oTyper);
  4. _inst.text_full = _text;
  5. _inst.text_shown = "";
  6. _inst.char_index = 0;
  7. _inst.char_timer = 0;
  8. _inst.char_delay = _delay;
  9. _inst.char_delay_out = _delay_out ?? _delay;
  10. _inst.is_done = true;
  11. _inst.type_direction = -1;
  12. _inst.active = false;
  13. _inst._prev_active = false;
  14. _inst.draw_x = _x;
  15. _inst.draw_y = _y;
  16. return _inst;
  17. }
  18. function typer_skip(_inst)
  19. {
  20. var _len = string_length(_inst.text_full);
  21. _inst.char_index = (_inst.direction == 1) ? _len : 0;
  22. _inst.text_shown = (_inst.direction == 1) ? _inst.text_full : "";
  23. _inst.is_done = true;
  24. }