<!--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>0</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</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>/// Initialize the variables
gamestart = 0;           
weap = "";
dash = 0;
</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>/// Start the base game

if (dash == 0)   // When gamestart == 4 and you hit (enter) This will happen 
{                // with the Dialog box ---------------- for all 5 lines
repeat(5)
    {
    obj_text_input.text5 = obj_text_input.text4; 
    obj_text_input.text4 = obj_text_input.text3; 
    obj_text_input.text3 = obj_text_input.text2; 
    obj_text_input.text2 = obj_text_input.text1;  
    obj_text_input.text1 = "-------------------"; 
    }
}

</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>/// Create the Start game
                            // Each gamestart code Chunk is a Text Action 
                            // Which ask the player a question and pushes the text up 
                            //*START AT THE BOOTEM OF THE CODE BLOCK*
    
if (gamestart == 4)
{
    if (keyboard_check_pressed(vk_enter))
    {                                           // Starts the alarm when the players enter
        alarm[0] = room_speed * 1;              // Sets the alarm 
        gamestart = 5;                          // Sets gamestart to 5 not looping the alarm 
    }                                               
}                                               // Noticed how gamestart chunks are going upwarded rather than downward
                                                // It's like this because code ordering matters like with the main part of this dialog engine
if (gamestart == 3)                                             
{
    if (keyboard_check_pressed(vk_enter))
    { 
        if (obj_text_input.text1 == "sword" or obj_text_input.text1 == "staff" or obj_text_input.text1 == "bow")  // Checks for what one the player inputed
            {
            weap = obj_text_input.text1                                                         // Set the instance variable weap = to the input  
            obj_text_input.text5 = obj_text_input.text1;                                        //push the text 
            obj_text_input.text4 = "So you would prefer a "+weap+", even more interesting.."    // Takes in players choice
            obj_text_input.text3 = "I can't wait to learn more about you Adventurer.."          // More talk 
            obj_text_input.text2 = "I'll be seeing you shorty.."+obj_player.name                // Creating character with the player  
            obj_text_input.text1 = "(enter) to start your adventure"                            // and ask to hit enter to start game and sets
            gamestart = 4;                                                                      //gamestart to four leading to the next action
            }
    }
       
}

if (keyboard_check_pressed(vk_enter) &amp;&amp; gamestart == 2) // You can have it this way or the other way(this just combines both of them)
    {
        if (obj_text_input.text1 == "M" or obj_text_input.text1 == "F") // Checks for "M" or "F"
       {
            if(obj_text_input.text1 == "M") obj_player.gender = "Male"; // if "M" player gender is male if not male, set player gender to female
            else obj_player.gender = "Female";
            
            obj_text_input.text5 = obj_text_input.text3;    // push the text up
            obj_text_input.text4 = obj_text_input.text2; 
            obj_text_input.text3 = obj_text_input.text1;                                    
            obj_text_input.text2 = "So your "+obj_player.gender+", that's good to know..."; // Responds to the player 
            obj_text_input.text1 = "Anyways I'm curious of what you would prefer. A (sword),(staff), or even a (bow)?"; // Asks the next question and sets
            gamestart = 3;                                                                                              //gamestart to three leading to the next action
        }
    }
    
if (gamestart == 1)
{
    if (keyboard_check_pressed(vk_enter))
    {                                                    // Sets obj_player.name = obj_text_input.text1(what the player just typed)
        obj_player.name = obj_text_input.text1;                 
        obj_text_input.text3 = obj_text_input.text2;     //and pushed the text up
        obj_text_input.text2 = obj_text_input.text1; 
        obj_text_input.text1 = "Hello "+obj_player.name+", are you male or female(M/F)";    // Then asks the next Question and sets 
        gamestart = 2;                                                                      //gamestart to two leading to the next action
    }
}

if (gamestart == 0)
{
    obj_text_input.text1 = "What is your name Adventurer...";      // Asking for Players Name and setting 
    gamestart = 1;                                                 // gamestart to one leading to the next action 
}    




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