Search Unity

Stealth Tutorial Error

Discussion in 'Community Learning & Teaching' started by Hormic, Aug 12, 2014.

  1. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    Hi all,

    I'm on Chapter 1 - Gamecontroller -> http://unity3d.com/learn/tutorials/projects/stealth/game-controller
    When i want to execute the game so far i get this errormessage:
    but line 23 seems correct, i copied it now from the tut to be safe its not an typing error:
    Code (CSharp):
    1.         alarm = GameObject.FindGameObjectWithTag(Tags.alarm).GetComponent<AlarmLight>();
    i controlled every script and can't find the reason.

    Maybe it's because i don't have the pro-version, and the problem is with the directional light setting on the light_main_directional and light_alarm_directional?
    Or maybe because there are scriptcommand changes in the newest version since the tutorial was written?

    Thanks for help!
     
  2. dannyhodge

    dannyhodge

    Joined:
    Mar 14, 2013
    Posts:
    30
    Instead of 'Tags.alarm', try 'alarm' inside the brackets (without the speechmarks). I'm still a beginner with Unity, but that is the way I do it, so maybe it works :)
     
  3. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    thank you danny for your reply, but this was not the problem,
    i have sorted out the error above it was my own mistake of choosing the Alarm Tag instead of the Alarmlight Tag.
     
    Last edited: Aug 14, 2014
  4. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    I'm done with the tut now, and i enjoyed it very much, but i still have error(s).
    The game is functioning, execpt the shootingpart, the guards are chasing me but they don't shoot.

    The errormessage i get is this one:
    Line 53 in script EnemySight is this:
    Code (CSharp):
    1. anim.SetBool(hash.playerInSightBool, playerInSight);
    i can't explain the error bymyself, have controlled all involved scripts with the hash table creation and so on,
    and nothing seems wrong.

    Thanks for help on this.
     
  5. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    push - nobody an idea?