Search Unity

Qualcomm AR project in

Discussion in 'Works In Progress - Archive' started by felicity, Jul 15, 2012.

  1. felicity

    felicity

    Joined:
    Jul 15, 2012
    Posts:
    1
    //Hi I am new to scripting and i am hoping someone out there will able to give me advice on what i am trying to do. //This is my pseudo script.
    //want it to count the words at the stages [import.GameObject.name == ("and");] then display the "welldone" game object.
    for (i=1; i<=13; i++)

    if(i===13)

    {
    import.gameObject.name == ("WellDone");
    }
    else
    {
    WaitForFixedUpdate(i);
    }
    //"a" and "i" will not have a collisions not sure what to add here instead.
    function ObjectModel
    if
    {
    if(theCollision.gameObject.name == "a");
    Destroy.GameObject.name == ("aGold");

    import.GameObject.name == ("CapitalA");
    }
    else if
    {
    if(theCollision.gameObject.name == "i");
    Destroy.GameObject.name == ("iGold");

    import.GameObject.name == ("CapitalI");
    }
    // have a collision function here as collision are attatched to the type [(theCollision.gameObject.name == "a");]
    function OnCollisionEnter(theCollision : Collision)
    if
    {
    if(theCollision.gameObject.name == "a");
    (theCollision.gameObject.name == "n");
    (theCollision.gameObject.name == "d");
    Destroy.GameObject.name == ("aGold");
    Destroy.GameObject.name == ("nGold");
    Destroy.GameObject.name == ("dGold");
    //would like to put in activition button or voice reconition so when student says word it makes triggers the below import.
    import.GameObject.name == ("and");
    }
    else if
    {
    if(theCollision.gameObject.name == "t");
    (theCollision.gameObject.name == "h");
    (theCollision.gameObject.name == "e");
    Destroy.GameObject.name == ("tGold");
    Destroy.GameObject.name == ("hGold");
    Destroy.GameObject.name == ("eGold");

    import.GameObject.name == ("the");
    }
    else if
    {
    if(theCollision.gameObject.name == "w");
    (theCollision.gameObject.name == "a");
    (theCollision.gameObject.name == "s");
    Destroy.GameObject.name == ("wGold");
    Destroy.GameObject.name == ("aGold");
    Destroy.GameObject.name == ("sGold");

    import.GameObject.name == ("was");
    }
    else if
    {
    if(theCollision.gameObject.name == "t");
    (theCollision.gameObject.name == "h");
    (theCollision.gameObject.name == "a");
    (theCollision.gameObject.name == "t");
    Destroy.GameObject.name == ("tGold");
    Destroy.GameObject.name == ("hGold");
    Destroy.GameObject.name == ("aGold");
    Destroy.GameObject.name == ("tGold");

    import.GameObject.name == ("that");
    }
    else if
    {
    if(theCollision.gameObject.name == "b");
    (theCollision.gameObject.name == "e");
    Destroy.GameObject.name == ("bGold");
    Destroy.GameObject.name == ("eGold");

    import.GameObject.name == ("be");
    }
    else if
    {
    if(theCollision.gameObject.name == "i");
    (theCollision.gameObject.name == "n");
    Destroy.GameObject.name == ("iGold");
    Destroy.GameObject.name == ("nGold");

    import.GameObject.name == ("in");
    }
    else if
    {
    if(theCollision.gameObject.name == "i");
    (theCollision.gameObject.name == "s");
    Destroy.GameObject.name == ("iGold");
    Destroy.GameObject.name == ("sGold");

    import.GameObject.name == ("is");
    }
    else if
    {
    if(theCollision.gameObject.name == "t");
    (theCollision.gameObject.name == "o");
    Destroy.GameObject.name == ("tGold");
    Destroy.GameObject.name == ("oGold");

    import.GameObject.name == ("to");
    }
    else if
    {
    if(theCollision.gameObject.name == "i");
    (theCollision.gameObject.name == "t");
    Destroy.GameObject.name == ("iGold");
    Destroy.GameObject.name == ("tGold");

    import.GameObject.name == ("it");
    }
    else
    {
    if(theCollision.gameObject.name == "o");
    (theCollision.gameObject.name == "f");
    Destroy.GameObject.name == ("oGold");
    Destroy.GameObject.name == ("fGold");

    import.GameObject.name == ("of");
    }
    }
    }
     
    Last edited: Jul 15, 2012