Search Unity

Survival Shooter Q&A

Discussion in 'Community Learning & Teaching' started by willgoldstone, Jul 3, 2015.

  1. BuckBuchanan

    BuckBuchanan

    Joined:
    Feb 16, 2017
    Posts:
    4
    See posts #544, 546-547
     
  2. XJ2

    XJ2

    Joined:
    Mar 1, 2017
    Posts:
    7
    Hi All,

    I'm stuck in lesson 2 player character.
    when I click play, my player character just stand there idling.
    I have unchecked the Has Exit Time on both Idle and move transition. And even on Any State to Death, the Has Exit Time had been unchecked.

    The error message in the console are as follows:

    Asset 'PlayerAC': Transition in state 'Idle' doesn't have an Exit Time or any condition, transition will be ignored
    UnityEditor.DockArea:OnGUI()

    Assertion failed on expression: 'timeSinceLastUsed >= 0'

    Please help.
    Thanks
    Your Newbie friend
     
    Last edited: Mar 8, 2017
    Quinnasinn likes this.
  3. imthemonster

    imthemonster

    Joined:
    Mar 4, 2017
    Posts:
    7
    How do i put soft darkness around the player? Like the image but a strong darkness (i made this in photoshop)

    upload_2017-3-7_13-20-27.png
     
  4. Eugen_Bogdanovskiy

    Eugen_Bogdanovskiy

    Joined:
    Mar 10, 2017
    Posts:
    1
    Hello, i'm just finished this tutorial and have an one issue.

    When i build game, audiotoggle button doesn't work, but in editor works fine.

    In console however, this message appears:
    'There are no audio listeners in the scene. Please ensure there is always one audio listener in the scene'

    What should i do?
     
  5. imthemonster

    imthemonster

    Joined:
    Mar 4, 2017
    Posts:
    7
    The lights are funny, i did nothing yet, just imported the complete game and loaded the complete scene. The lights are unmarked in this picture, to show how the lights are. What should i do

    upload_2017-3-15_19-32-12.png
     
  6. mehradmbs

    mehradmbs

    Joined:
    Sep 7, 2013
    Posts:
    11
    Hi everyone, i remembered that this course have extended tutorial, Ai extend and other things. where is it? i didn't find that...
     
  7. dashticle

    dashticle

    Joined:
    May 25, 2016
    Posts:
    4
    Also curious as to where the Using Interfaces to Create an AI State Machine tutorial went that extended this game!
    I'm getting 404/403 now while trying to access it.
     
    mehradmbs likes this.
  8. ZeRuc

    ZeRuc

    Joined:
    Mar 3, 2017
    Posts:
    25
    I am stuck on the navmesh part of the tutorial. I have tried to add Nav Mesh Agent to Zombunny, but then I get this message:
    "Failed to create agent because there is no valid NavMesh"
    Also I get a "Step Height conflicts with Max Slope" message after trying to decrease Step Height, as suggested in tutorial.

    Edit: I have solved the above problem, apparently I had to click the "Bake" button first. But I now have few more questions.
    1. I want to change the way healthbar is displayed so that the heart is fullly red when player's health is full and empties out as player take damage. How to do that?
    2. I want to zoom in/out with a mousewheel. Is that even possible with orthographic camera?
     
    Last edited: Mar 24, 2017
  9. ExtremeHowler

    ExtremeHowler

    Joined:
    Mar 24, 2017
    Posts:
    2
    Hey I have a problem i was stupid and messed up the enemymovemnt script and now it doesn't work.. please help. I keep getting error: "SetDestination" can only be on an active agent that has been placed on mesh. Capture333.PNG Capture343.PNG
     
  10. ExtremeHowler

    ExtremeHowler

    Joined:
    Mar 24, 2017
    Posts:
    2
    second image, sorry... Capture343.PNG
     
  11. ritchgee68

    ritchgee68

    Joined:
    Mar 25, 2017
    Posts:
    4
    The animation for the game over fader is a little different than before, but I figured it out somewhat (I changed colors and font size)...only trouble is that the score is upside down! any ideas?
     
  12. rabart

    rabart

    Joined:
    Apr 5, 2017
    Posts:
    1

    I had this prob and this fixed it right away. Thanks RFan95
     
  13. aes421

    aes421

    Joined:
    Apr 8, 2017
    Posts:
    2
    Hi all, I am having a very weird problem starting in video 1. When I drag "Environment" from the Prefabs folder it gets to step "3/11 Create System|5 Jobs" on the blue bar. I start getting THOUSANDS of errors then. I have attached a screen shot. I have only found one way to stop the errors, and that's if I manually delete the following from the Environment: Dollhouse, Train, Wall, Side & Base (from Floor), Firetruck, Hearse, Arches, and Robot. I have also attached a picture showing what's left. As soon as I delete those, the blue bar finishes.

    Clearly deleting all of these is not a good solution. What could be causing this problem?? Thanks!
    upload_2017-4-7_18-54-43.png
    upload_2017-4-7_18-57-29.png


    EDIT: I have found a solution. On the Environment prefab, deselect "static" (beside the name"). Yes, for all children also. I no longer get the error now.
     
  14. Wizzurd-Of-Uzz

    Wizzurd-Of-Uzz

    Joined:
    May 25, 2015
    Posts:
    3
    So I messed up. I was going to move the event on the bunny a little later, but when i did it broke my bunny anim. about halfway through the animation it just repeats. when i click on anything in the hierarchy or the project it sinks but the anim dosent finish. Please help.
     
  15. Zedidiah

    Zedidiah

    Joined:
    Apr 14, 2017
    Posts:
    1
    Does anyone know why my bunny flops over on his side every time I click play? I have tried adjusting everything I can think of and it doesn't seem to change anything.
     
  16. Wizzurd-Of-Uzz

    Wizzurd-Of-Uzz

    Joined:
    May 25, 2015
    Posts:
    3
    it might be triggering the death anim early what settings do you have in the animator tab?
     
  17. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    **EDIT** Never Mind. It does appear that the "Line Renderer" has changed a bit. I opened up the "done" project and looked at the settings for it's "Line Renderer", and then used it's values. The secret is that you can drag the graphs setting downwards.

    Hello,
    I'm having a problem when adding "Line Renderer" to the GunBarrel child.
    The one in the tutorial (Number 7 at 17:52) includes a Parameters section
    When I add the "Line Renderer" I don't have the parameters section, so I can't set Start and End Width.
    I get something that includes Use World Space, Loop, and other things that aren't in the tutorials example.
    If I go ahead and use this component, I get a very wide image. The game does work, but it looks strange.
    I'm using Windows10 Unity version 5.6.0f3 (64bit)
    Thanks
     
    Last edited: Apr 26, 2017
  18. ekuehnl

    ekuehnl

    Joined:
    Apr 28, 2017
    Posts:
    1
    I'm on Lesson 09. I don't see the Zombear or Hellephant in my Prefabs folder. They are present in the _Complete-Game prefabs folder, but if I just copy those over I get some errors that I'm not knowledgeable enough to figure out.

    Thoughts? I can't be the only one missing these files in the current asset download.

    Thanks!
     
  19. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    Yea, that got me too. For soln, see https://forum.unity3d.com/threads/survival-shooter-q-a.338190/page-11#post-2962342

    My experience has been to only use _Complete-Game folder things as reference only, dont try to use.
    I'm going to play with it a bit more later today - I'm curious if we could import the missing prefab assets from the _Complete-Game folder and have them be usable that way (after updating references like script pointers, animation pointers, and the like)
    Yup, it works to import the ZomBear and Hellephant asset from the _Complete-Game prefab folder into the current prefab, then put the copied prefab into the main scene hierarchy, make the mods, then put it back to the prefab. I know you can "apply" the changes to the prefab, but I just deleted the prefab copy and put the edited copy back down to the prefabs. It's actually a good learning experience on importing assets. Yea, thats the ticket...



    If the premade prefabs doesn't get resolved, then I would hope some verbage could
    be added to section "09. SPAWNING ENEMIES" of the tutorials pdf
    "...Survival Shooter\Assets\Tutorials-SurvivalShooter-Upgrade to 5.pdf)
    highlighting BuckBuchanan solution
     
    Last edited: Apr 28, 2017
    rodneya63 likes this.
  20. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    Hi, everyone. I got stuck on scene #7. When i shooting GunBarrelEnd change his position to end destinations of shoot.
    I think it's something with PlayerShooting script.

    I attached GIF link with this issue and here is link for project
     
  21. MrSlow2

    MrSlow2

    Joined:
    May 7, 2017
    Posts:
    1

    I know it's been a while, but I run into same #### (using unity 5.6) and maybe there will be another one with this problem.
    The Problem: You have the collider on the player set as trigger(necessary for the enemy to attack the player).
    My solution: Add another collider(sphere worked for me. No other changes) and make sure this is NOT a trigger.
    Hope I could spare some of you a bit of time.
     
  22. fant0x

    fant0x

    Joined:
    May 8, 2017
    Posts:
    2
    For anyone who have problem with NullReferenceException In EnemyAttack.cs I found out, that in awake function in line #28
    Code (CSharp):
    1. GameObject.FindGameObjectWithTag("Player");
    Unity can`t find my object by tag when it`s a "Player" tag i changed it to my own tag "custom" and everything runes smoothly.
    Code (CSharp):
    1. GameObject.FindGameObjectWithTag("Custom");
    Don`t forget to change tag on Player in unity .
     
  23. fant0x

    fant0x

    Joined:
    May 8, 2017
    Posts:
    2
    Animation folder, is one u need to create it`s said in tutorial. And I dont have scene folder either
     
  24. Vigliaron

    Vigliaron

    Joined:
    May 12, 2017
    Posts:
    1
    Hi, this is my problem, when i launch the game, the game over's screen appears directly as it did in the video, but the way they fixed it doesn't works for me, does someone can help me please ? (sorry for my english i'm french)
     
  25. Reiizu

    Reiizu

    Joined:
    Apr 6, 2017
    Posts:
    6
    Where do i change the player tag?
     
  26. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    Here
     

    Attached Files:

  27. Reiizu

    Reiizu

    Joined:
    Apr 6, 2017
    Posts:
    6
    so i've been having a problem with the spawning of my zombunnys it went well before when it was just the zombunnies and there was no spawn points
    the error is:
    NullReferenceException: Object reference not set to an instance of an object
    CompleteProject.EnemyAttack.Update () (at Assets/_Complete-Game/Scripts/Enemy/EnemyAttack.cs:65)

    and my script is:
    using UnityEngine;
    using System.Collections;

    namespace CompleteProject
    {
    public class EnemyAttack : MonoBehaviour
    {
    public float timeBetweenAttacks = 0.5f; // The time in seconds between each attack.
    public int attackDamage = 10; // The amount of health taken away per attack.


    Animator anim; // Reference to the animator component.
    GameObject player; // Reference to the player GameObject.
    PlayerHealth playerHealth; // Reference to the player's health.
    EnemyHealth enemyHealth; // Reference to this enemy's health.
    bool playerInRange; // Whether player is within the trigger collider and can be attacked.
    float timer; // Timer for counting up to the next attack.


    void Awake ()
    {
    // Setting up the references.
    player = GameObject.FindGameObjectWithTag ("Player");
    playerHealth = player.GetComponent <PlayerHealth> ();
    enemyHealth = GetComponent<EnemyHealth>();
    anim = GetComponent <Animator> ();
    }


    void OnTriggerEnter (Collider other)
    {
    // If the entering collider is the player...
    if(other.gameObject == player)
    {
    // ... the player is in range.
    playerInRange = true;
    }
    }


    void OnTriggerExit (Collider other)
    {
    // If the exiting collider is the player...
    if(other.gameObject == player)
    {
    // ... the player is no longer in range.
    playerInRange = false;
    }
    }


    void Update ()
    {
    // Add the time since Update was last called to the timer.
    timer += Time.deltaTime;

    // If the timer exceeds the time between attacks, the player is in range and this enemy is alive...
    if(timer >= timeBetweenAttacks && playerInRange && enemyHealth.currentHealth > 0)
    {
    // ... attack.
    Attack ();
    }

    // If the player has zero or less health...
    if(playerHealth.currentHealth <= 0)
    {
    // ... tell the animator the player is dead.
    anim.SetTrigger ("PlayerDead");
    }
    }


    void Attack ()
    {
    // Reset the timer.
    timer = 0f;

    // If the player has health to lose...
    if(playerHealth.currentHealth > 0)
    {
    // ... damage the player.
    playerHealth.TakeDamage (attackDamage);
    }
    }
    }
    }


    I also have a couple similar problems that i don't understand if anyone can help it would be great because i also have a time limit of 8 days so its kind of urgent
     
  28. Reiizu

    Reiizu

    Joined:
    Apr 6, 2017
    Posts:
    6
    and where is custom? im sorry im new to unity
     
  29. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    Click on Tag menu and select Add Tag, then add new tag with Custom name, or what you want, then select this new name. Tag name must be same as in the code.
     
  30. Deleted User

    Deleted User

    Guest

    The Player tag already exists in the list. You don't need to create a new one.
     
  31. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    But there is an issue where is Player Tag is need to be changed to someone else.
     
  32. Deleted User

    Deleted User

    Guest

    First of all, edit the post that contains your script and use the code tags: http://forum.unity3d.com/threads/using-code-tags-properly.143875/

    Then, go back to the videos and make sure you didn't overlook anything; make sure your code doesn't contain any typos. As would @Adam-Buckner say, "C# is CaSe sEnsiTive!
     
  33. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    I didn't write any code on forum, and i know about code tags. And I doubt that my issue in cases, cos i already look all of this codes few times and even copy them from under videos code samples.
     
  34. Deleted User

    Deleted User

    Guest

    Sorry, I made a confusion.

    Copying and pasting code is not a good idea either. Replay the videos then and make sure you didn't over look any step. :)
     
  35. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    Happens ;). Yes, maybe I need to start this tutorial from the beginning
     
  36. jantelo1

    jantelo1

    Joined:
    May 14, 2017
    Posts:
    1
    Hi,

    I just downloaded the Survival Shooter package from the Asset store but when I open it in Unity, it doesn't seem like I downloaded anything.. the assets folder is completely empty and there is nothing in my scene view
     
  37. Deleted User

    Deleted User

    Guest

    Are you sure you imported the project after downloading it?
     
  38. Chrisking01

    Chrisking01

    Joined:
    May 14, 2017
    Posts:
    4
    Hi. I have a problem with lesson 4. now nothing works. Can you help me?

    upload_2017-5-14_20-7-55.png upload_2017-5-14_20-8-16.png

    Lg Chris :)
     
  39. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    If you change line 9 of the C# code
    from:NavMeshAgent nav;
    to: UnityEngine.AI.NavMeshAgent nav;
    That may help with that issue.

    But.... I always get nervous when I see an error message in the Unity console referring referring to issues with "_Done" or "Complete" in the text string as it could mean different conflict underlying things. I'm too new to Unity myself to say why I think this could be a bad thing (or, heck, even if it really is), but my slight experience is that this could be a problem
     
  40. Reiizu

    Reiizu

    Joined:
    Apr 6, 2017
    Posts:
    6
    So i have 3 problems that i need help with and i was wondering if i can quickly get them all answered cause they are similar, so for the first one the error i got is

    NullReferenceException: Object reference not set to an instance of an object
    CompleteProject.EnemyMovement.Update () (at Assets/_Complete-Game/Scripts/Enemy/EnemyMovement.cs:27)

    The script that has an "error" in it is
    Code (CSharp):
    1.             if (enemyHealth.currentHealth > 0 && playerHealth.currentHealth > 0)
    the second is error that pops up is the same but in the Enemy attack

    the script is
    Code (CSharp):
    1.             if(playerHealth.currentHealth <= 0)
    the third error is
    NullReferenceException: Object reference not set to an instance of an object
    EnemyManager.Spawn () (at Assets/Scripts/Managers/EnemyManager.cs:19)

    and the script is

    Code (CSharp):
    1.         if(playerHealth.currentHealth <= 0f)
    Please help because i need to finish the tutorial as soon as possible!
     
  41. ICE_DragonM

    ICE_DragonM

    Joined:
    Feb 14, 2017
    Posts:
    7
    I have decided that it is not worth to doing this project, there is not enough information to work with, and all the explanation given here in the FDP does not help and is not updated, I have Unity 5.6 and it does not fit to the explanations here, and I'm not going to download version 4.6 just for this project...
     
  42. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Are you working from a new empty scene, as suggested by the tutorial? Or are you editing then demo level?
     
  43. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Are you working from a new empty scene, as suggested by the tutorial? Or are you editing then demo level?

    I'm worried as the error is related to the complete project. You should not be accessing the complete project or its namespace for this lesson. Have you checked every step in the videos without short cuts?
     
  44. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Our apologies. We always feel it is better to leave material available now, even if I'd is old and tending towards obsolete, as there are users who can work with the material and appreciate the resources provided. There are some newer tutorials and there are then regular live training sessions, all which should be able to help you out.
     
  45. ICE_DragonM

    ICE_DragonM

    Joined:
    Feb 14, 2017
    Posts:
    7
    Hii Adam, the tutorial itself does not bother me, what bothers me is that there is no updated file for the changes that need to be made in order for the game to work properly, there are some changes in Unity itself And when you try to work with a new version according to an old version without knowing what changes you have to make it is very difficult
     
  46. Deleted User

    Deleted User

    Guest

    I just got a notification warning me that this post of mine had been edited:

    Capture4.JPG

    but there is no mention of who did it or why it was edited?
     
  47. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    We could ask @Matthew-Schell, but sometimes these projects just get old and beyond their years.
     
  48. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Unclear... Fixing a broken link?
     
  49. Reiizu

    Reiizu

    Joined:
    Apr 6, 2017
    Posts:
    6
    yes I've started with a brand new scene
     
  50. kisame1313

    kisame1313

    Joined:
    Mar 25, 2017
    Posts:
    8
    How does Unity team feel about making new lessons or fully update this ?