<!--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>-1000001</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>strno = 0;
str = ""
display_string = "" 
position = 0
display_position= 0
//width_counter = 0
last_space = 0
text_speed = 1
message_display = 0
yw_font = font_add_sprite(sprYouWin,ord('I'),true,1)
cursor_image_index = 0
cursor_timer = 0
playpsisound = 0
typesound = 0
played = 0
can_type = 0
stop = 0

x = view_xview
y = view_yview
alarm[1] = 1;
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>can_type = 1
</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
}

if room = rmBattle {
    if is_array(str) {
        objBattleController.msg = str[message_display]
    } else {
        objBattleController.msg = ""
    }
}

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
        {
            instance_destroy()
        }
    }
}

// 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

//if !strnon { strno = max(array_length_1d(str) - 1,0); strnon = 1 } 

if string_length(display_string) != string_length(str[message_display]) and !stop and can_type {
    if message_display = strno and !played and playpsisound {
        played = 1
        audio_play_sound(sndpsilearn,0,0)
    }
    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 string_char_at(str[message_display],display_position) = "{" {
            str[message_display] = string_delete(str[message_display],display_position,1)
            display_string = string_copy(str[message_display],1,display_position)
            if !audio_is_playing(sndtext) and typesound { audio_play_sound(sndtext,0,0) }
        }
        can_type = 0
        alarm[1] = 20
    } else {
        // Type normally
        //alarm[1] = text_speed
        if !audio_is_playing(sndtext) and typesound { audio_play_sound(sndtext,0,0) }
    }
}
</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_font(global.thenfont)
    draw_set_halign(fa_left)
    draw_set_color(c_white)
    if room != rmBattle {
        draw_window(view_xview+8+v_offset,view_yview+8,38,5)
    }
    if str[message_display] != "YOU WONZ"{
        draw_text(view_xview+16+v_offset,view_yview+14,"@ "+display_string)
    } else {
        draw_set_font(yw_font)
        draw_set_halign(fa_center)
        draw_text(view_xview+160+v_offset,view_yview+16,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+40,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>0,0</point>
    <point>160,160</point>
  </PhysicsShapePoints>
</object>
