Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

how do i indicate an element?

Discussion in 'Scripting' started by Thomas-Reolon, Jan 30, 2015.

  1. Thomas-Reolon

    Thomas-Reolon

    Joined:
    Jan 17, 2015
    Posts:
    6
    how do I indicate an element?

    example:

    size: 2

    element 1 Warrior
    element 2 Warrior

    indicate the element and not the name!



    var itemOK: String [];

    functrion Start ()
    {

    }

    function Update ()
    {

    if (itemOK [element here])

    }

    already tried itemOK [0] itemOK [element0]
     
  2. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Spamming unrelated threads begging for yours to be read is a good way to get reported - so stop doing that. Secondly, use code tags when posting code. Thirdly, ask a question that actually makes sense. Fourthly, your if statement won't work because itemOK is a string[] not a bool[]