<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>&lt;undefined&gt;</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>-388626433</depth>
  <persistent>0</persistent>
  <parentName>parDeactivator</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if instance_number(objTextBox) &gt; 1 { instance_destroy(); exit;}

display_string = "";
position = 0;
display_position= 0;
//width_counter = 0;
last_space = 0;
text_speed = 1;
message_display = 0;
over = false;
over_sound = 0;
strno = 0;
stop = 0;
draw_top = 0;
can_type = 1;
portrait = 0;
if instance_exists(parCamera) { 
    if (parCamera.y &gt; room_height - 88) {
        draw_top = 1;
    }
}

if instance_exists(objPlayer) { 
    if (objPlayer.y &gt; room_height - 88) {
        draw_top = 1;
    }
}

cursor_image_index = 0
cursor_timer = 0

for (var i=0;i&lt;11;i++) {
    name[i] = "";
}

if instance_exists(objPlayer) {
    objPlayer.canmove = 0;
}

alarm[1] = 10;
alarm[2] = 1;

</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="2">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>strno = max(array_length_1d(str) - 1,0)
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="1">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Handle typing messages
can_type = 1
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Close dialog bog, handle questions and timelines
if instance_exists(objQuestion) {
    objQuestion.alarm[0] = 1
} else {
    if global.timeline_obj != noone {
        with global.timeline_obj { timeline_running = 1; timeline_speed = 1; } 
    } else {
        if instance_exists(objPlayer) {
            objPlayer.canmove = !global.cutscene
        }
    }
}

if room = rmFallback { game_restart() }

if over_sound != 0 { audio_play_sound(over_sound,10,0) } 

instance_destroy();
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>cursor_timer +=0.25

if cursor_timer = 1 {
    cursor_image_index +=1
    cursor_timer = 0
}

// Show the next message or close the box
if keyboard_check_pressed(global.kb_choose) {
    if string_length(display_string) = string_length(str[message_display]) or stop {
        if message_display != strno {
            stop = 0
            message_display +=1
            display_string = ""
            position = 0
            display_position = 0
            //width_counter = 0
            last_space = 0
            alarm[1] = text_speed
        } else {
            if over = false {
                alarm[0]=1
                over = true
                exit
            }
        }
    }
}

// Show all the text at once
if keyboard_check_pressed(global.kb_back) {
    str[message_display] = string_replace(str[message_display],"{","")
    display_string = str[message_display]
    stop = 1
}
</string>
          </argument>
        </arguments>
      </action>
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Handle typing messages
//strno = max(array_length_1d(str) - 1,0)
if string_length(display_string) != string_length(str[message_display]) and !stop and can_type {
    scr_type()
    if string_char_at(str[message_display],display_position) = "{" or string_char_at(str[message_display],display_position+1) = "@" {
        //Add a pause but don't remove line breaks
        if display_position &gt; 1 {
            if string_char_at(str[message_display],display_position) = "{" {
                if !audio_is_playing(sndtext) audio_play_sound(sndtext,0,0)
                str[message_display] = string_delete(str[message_display],display_position,1)
                display_string = string_copy(str[message_display],1,display_position)
            }
            can_type = 0
            alarm[1] = 20*text_speed
        }
    } else {
        // Type normally
        if !audio_is_playing(sndtext) audio_play_sound(sndtext,0,0)
        //alarm[1] = text_speed
    }
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>draw_set_alpha(1)
draw_set_halign(fa_left)
draw_set_color(c_white)

if name[message_display] != "" {
    draw_window(view_xview+65,view_yview+iff(draw_top,35,164),8,5)
}

if !(instance_exists(objTitleCard) or room = rmGameOver or room = rmFallback) {
    draw_window(view_xview+61,view_yview+iff(draw_top,4,179),38,7)
}

//Draw the name
draw_set_font(global.thenfont2)
if name[message_display] != "" {
    draw_text(view_xview+72,view_yview+iff(draw_top,59,168),name[message_display])
} 

//Draw the message
draw_set_font(global.thenfont)
draw_text(view_xview+69,view_yview+iff(draw_top,12,187),display_string)

//If the message is done typing out...
if string_length(display_string) = string_length(str[message_display]) or stop { 
    draw_sprite_ext(spr_continue,cursor_image_index,view_xview+350,view_yview+iff(draw_top,54,229),1,1,0,c_white,image_alpha) 
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints>
    <point>152,12</point>
    <point>152,152</point>
  </PhysicsShapePoints>
</object>
