| 1 |
function scr_draw_text_effect_twitchy_quotebubble_battle_reversescr_draw_text_effect_twitchy_quotebubble_battle_reversefunction scr_draw_text_effect_twitchy_quotebubble_battle_reverse()
{
var twitchy_text_probability = global.twitchy_text_probability;
var twitchy_text_intensity = global.twitchy_text_intensity;
str_indent = "";
str_indent_count = 0;
str_offset = -string_width(string_hash_to_newline(string_copy("A", 1, 1)));
for (var i = 1; i <= characters; i += 1)
{
twitchy_text_offset_x = 0;
twitchy_text_offset_y = 0;
twitchy_text_number = irandom_range(1, twitchy_text_probability);
if (twitchy_text_number == twitchy_text_probability)
{
twitch_direction = irandom_range(1, 4);
switch (twitch_direction)
{
case 1:
twitchy_text_offset_x = 1;
twitchy_text_offset_y = 0;
break;
case 2:
twitchy_text_offset_x = -1;
twitchy_text_offset_y = 0;
break;
case 3:
twitchy_text_offset_x = 0;
twitchy_text_offset_y = 1;
break;
case 4:
twitchy_text_offset_x = 0;
twitchy_text_offset_y = -1;
break;
}
}
str_char = string_char_at(message[message_current], i);
if (str_char == "#")
{
str_indent_count += 1;
if (str_indent_count == 1)
str_indent = "#";
else if (str_indent_count == 2)
str_indent = "##";
else if (str_indent_count == 3)
str_indent = "###";
else if (str_indent_count == 4)
str_indent = "####";
str_offset = -string_width(string_hash_to_newline(string_copy("A", 1, 1))) * 2;
}
str_offset += string_width(string_hash_to_newline(string_copy("A", 1, 1)));
if (string_lettersdigits(str_char) == "")
draw_text(obj_quote_bubble_battle_reverse.x + 15 + str_offset, obj_quote_bubble_battle_reverse.y + 13, string_hash_to_newline(str_indent + str_char));
else
draw_text(obj_quote_bubble_battle_reverse.x + 15 + str_offset + (twitchy_text_offset_x * twitchy_text_intensity), obj_quote_bubble_battle_reverse.y + 13 + (twitchy_text_offset_y * twitchy_text_intensity), string_hash_to_newline(str_indent + str_char));
}
} () |
| 2 |
{ |
| 3 |
var twitchy_text_probability = global.twitchy_text_probability; |
| 4 |
var twitchy_text_intensity = global.twitchy_text_intensity; |
| 5 |
str_indent = ""; |
| 6 |
str_indent_count = 0; |
| 7 |
str_offset = -string_width(string_hash_to_newline(string_copy("A", 1, 1))); |
| 8 |
for (var i = 1; i <= characters; i += 1) |
| 9 |
{ |
| 10 |
twitchy_text_offset_x = 0; |
| 11 |
twitchy_text_offset_y = 0; |
| 12 |
twitchy_text_number = irandom_range(1, twitchy_text_probability); |
| 13 |
if (twitchy_text_number == twitchy_text_probability) |
| 14 |
{ |
| 15 |
twitch_direction = irandom_range(1, 4); |
| 16 |
switch (twitch_direction) |
| 17 |
{ |
| 18 |
case 1: |
| 19 |
twitchy_text_offset_x = 1; |
| 20 |
twitchy_text_offset_y = 0; |
| 21 |
break; |
| 22 |
case 2: |
| 23 |
twitchy_text_offset_x = -1; |
| 24 |
twitchy_text_offset_y = 0; |
| 25 |
break; |
| 26 |
case 3: |
| 27 |
twitchy_text_offset_x = 0; |
| 28 |
twitchy_text_offset_y = 1; |
| 29 |
break; |
| 30 |
case 4: |
| 31 |
twitchy_text_offset_x = 0; |
| 32 |
twitchy_text_offset_y = -1; |
| 33 |
break; |
| 34 |
} |
| 35 |
} |
| 36 |
str_char = string_char_at(message[message_current], i); |
| 37 |
if (str_char == "#") |
| 38 |
{ |
| 39 |
str_indent_count += 1; |
| 40 |
if (str_indent_count == 1) |
| 41 |
str_indent = "#"; |
| 42 |
else if (str_indent_count == 2) |
| 43 |
str_indent = "##"; |
| 44 |
else if (str_indent_count == 3) |
| 45 |
str_indent = "###"; |
| 46 |
else if (str_indent_count == 4) |
| 47 |
str_indent = "####"; |
| 48 |
str_offset = -string_width(string_hash_to_newline(string_copy("A", 1, 1))) * 2; |
| 49 |
} |
| 50 |
str_offset += string_width(string_hash_to_newline(string_copy("A", 1, 1))); |
| 51 |
if (string_lettersdigits(str_char) == "") |
| 52 |
draw_text(obj_quote_bubble_battle_reverse.x + 15 + str_offset, obj_quote_bubble_battle_reverse.y + 13, string_hash_to_newline(str_indent + str_char)); |
| 53 |
else |
| 54 |
draw_text(obj_quote_bubble_battle_reverse.x + 15 + str_offset + (twitchy_text_offset_x * twitchy_text_intensity), obj_quote_bubble_battle_reverse.y + 13 + (twitchy_text_offset_y * twitchy_text_intensity), string_hash_to_newline(str_indent + str_char)); |
| 55 |
} |
| 56 |
} |