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

Spawn Enemy AI when picking up a paper.

Discussion in 'Scripting' started by AxelDriesenMct, Feb 27, 2015.

  1. AxelDriesenMct

    AxelDriesenMct

    Joined:
    Feb 20, 2015
    Posts:
    8
    Hello guys, Me and my friends are making a horrorgame as a school project. got 2 script down already.
    1. I can make my enemy Ai move trough doors while following the player using a nav mesh and navagent + script.

    2. we also got a script to pick up notes.

    now id like to have a simple c# script that makes the enemy spawn Once and use the navagent to follow my player so if its near player it can use its audioscare and stuff. But only when that one note is read as some kind of trigger.

    Pls help me :)! much appreciated and sorry for the bad English.
     
  2. ADNCG

    ADNCG

    Joined:
    Jun 9, 2014
    Posts:
    989
    Are you asking for a script or a specific question?
     
  3. AxelDriesenMct

    AxelDriesenMct

    Joined:
    Feb 20, 2015
    Posts:
    8
    a script that makes my enemyAi spawn ONCE when a note is picked up.
     
  4. kdubnz

    kdubnz

    Joined:
    Apr 19, 2014
    Posts:
    177
    Go to
    http://answers.unity3d.com/

    In the search box type 'Spawn once' without the quotes.

    Hit Enter.

    Read the resulting threads.

    ... and have a glance at the Related Questions list for each thread.