Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Survival Shooter Q&A

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

  1. nwzebra

    nwzebra

    Joined:
    Dec 4, 2015
    Posts:
    16
    OK, stupid question, is the player tagged as "Player" ? An untagged player will cause this behavior because the Zombunny has no one to chase.
     
  2. hpep

    hpep

    Joined:
    Oct 27, 2016
    Posts:
    2
    Hi
    How do I download the sample project?
    When I click on the: 'Open in unity' Unity is started, the thin bar below 'Projects' is animated for a second or two and then nothing else happens.
    Is there a way for me to download a .zip file or something?

    I'm using:
    • Unity: 5.4.2f2
    • OS: Windows 8.1
    • Browser: Chrome, Firefox and Explorer
    I've logged in to the website, to see if that changed anything.
    Nothing has been downloaded to the 'Unity EssentialsSample Projects' directory.

    Any suggestions appreciated.
     
  3. hpep

    hpep

    Joined:
    Oct 27, 2016
    Posts:
    2
    It seems like I had to click on the 'Standard assets example project' on the unity app start screen,
    then from there search for the project
    and then click: 'Open in unity'
    Then it downloads it.
     
  4. podian

    podian

    Joined:
    Oct 27, 2016
    Posts:
    2
    Hello! I was wondering how to add a small knockback (or slowing effect) to the raycaster weapon that the Player uses.
    I got the Zombunny to move increasingly fast as score increases and would like the raycaster to momentarily ensnare or reduce the speed of any enemy it hits. Thank you!
     
  5. nwzebra

    nwzebra

    Joined:
    Dec 4, 2015
    Posts:
    16
    Through the EnemyHealth script you know when an enemy has been hit. You can put your ensnare code there.
     
  6. Root13

    Root13

    Joined:
    Nov 2, 2016
    Posts:
    12
    Is there anyone, who already made this? how much time does it take?
     
  7. podian

    podian

    Joined:
    Oct 27, 2016
    Posts:
    2
    Thank you nwzebra, that's a great idea.

    and root13, it took me about 4 hours to go through the tutorials for the basic version.
     
  8. Vujosevic

    Vujosevic

    Joined:
    Nov 3, 2016
    Posts:
    1
    Hey guys, great tutorial but I am stuck and I am not sure what is the problem. So the problem is with the animation and scoring. First, in animation part Has Exit Time is unchecked and it is working, but when I kill any of the enemies they just stand in that spot and continue the movement in one spot, no death animation and falling through the floor. Next thing is after setting up score it worked but after adding spawn points there is no more scoring after kill. Any help? Thank you
    Using Unity 5.4.1f1
     
  9. thegamer1234

    thegamer1234

    Joined:
    Feb 13, 2015
    Posts:
    48
    First of all, this was an amazing tutorial.

    This happens to be a bug when I finished phase 9 of this tutorial.
    The tutorial seemed to have the the zombear and helephant already in the prefab folder, so to get on par, I used the ones in the completed Assets folder.

    I proceeded as instructed, but at the end I found that while the zombunnies worked well, the zombear and helephant didn't.
    The zombear and helephant were stuck at spawn, and could not be shot.

    I seemed to have this error:

    NullReferenceException: Object reference not set to an instance of an object

    As this did not happen with the zombunny, I removed the enemy scripts in the Completed assets\scripts\enemy and added the scripts in the Scripts\enemy folder.(which was used earlier in the tutorial with the zombunny.)
    And lo! The game works fine!

    Can someone explain this?
    (I apologize for the lack of images, I could not recreate the bug)
     
    shanniko likes this.
  10. GregPDesUGD

    GregPDesUGD

    Joined:
    Jul 27, 2016
    Posts:
    93
    One thing catches my attention: if the camera is following the player based on their position, why is the camera's position set in FixedUpdate and not LateUpdate?

    Today, I came across this execution order of event functions, which includes the regular functions that are called frame by frame. https://docs.unity3d.com/Manual/ExecutionOrder.html

    And from looking at one question in Unity Answers, they say that it's practical to use LateUpdate to update the camera's position so that it always has the player at the center of the view most of the time. (I believe from working through the tutorial, I didn't see the boundaries that prevent the player from going out of bounds.)

    EDIT: On second thought, could it be that when a frame is rendered, FixedUpdate would keep the camera in sync with the player that LateUpdate would sometimes have trouble with in situations such as lag?
     
    Last edited: Nov 7, 2016
  11. BiG_BoB_BuNsOy

    BiG_BoB_BuNsOy

    Joined:
    Nov 12, 2016
    Posts:
    1
    hello...i was try to do this survival shooter game...my problem is 1st the zombear doesnt have a animation,second only the zombunny follow and hurt the player and die...the hellephant doesnt follow the player and i cannot event hurt/shoot the helleplhant....i could really use some help here since i am a student and im making this as my reference to make my project....thank you God bless...
     
  12. Maleke

    Maleke

    Joined:
    Nov 16, 2016
    Posts:
    2
    Hello Friends,

    There is a problem with the level that if you stand in the mouse hole you are always safe. I've been trying to tweak the nav agent to get the enemies to chase the player inside the hole, but I'm not having luck.

    Did anyone else find a solution to this?

    -Mal
     
  13. NamanRai

    NamanRai

    Joined:
    Nov 27, 2016
    Posts:
    1
    hey guys plz help as i couldn,t find any help
    MY ZOMBEAR AND HELLEPHANT ARE NOT MOVING AND NOT FOLLOWING THE PLAYER AND I AM IN PART 9 OF THE TUTORIAL AND PLZ HELP GUYS WHAT TO DO
    I HAVE DONE DONE EVERYTHING FROM THE BEGINNING CORRECT
    PLZ HELP!!!!!!!!!!!!:(:(:(:(:(:(
     
  14. wimolsuntirungsi

    wimolsuntirungsi

    Joined:
    Dec 10, 2016
    Posts:
    39
    MAY I CAN USE SOME OF MODEL MAP FROM THESE ASSEST TO MAKE A GAME AND SELL IT ??

    OR THIS GAME ASSET HAVE ALLOWED FOR ONLY LEARN NOT TO USE IN COMMERCIAL ??

    IF IT CAN USE FOR COMMERCIAL IT IS VERY GREAT
     
  15. Rider4444

    Rider4444

    Joined:
    Dec 12, 2016
    Posts:
    3
    I am trying to kill the zombunny in survival shooter.....
    But it only plays the death sound......and not the death video

    Even after killing it, it follows me but doesn't harm me.......

    Kindly Help me ASAP.....

    Pls....Pls.....Pls



    Pls reply........
    ASAP......
     
    Last edited: Dec 12, 2016
  16. Rider4444

    Rider4444

    Joined:
    Dec 12, 2016
    Posts:
    3
    Someone pls help me out
     
  17. Rider4444

    Rider4444

    Joined:
    Dec 12, 2016
    Posts:
    3
    No need
    I figured it out....
     
  18. 8bitBonfire

    8bitBonfire

    Joined:
    Dec 2, 2016
    Posts:
    1
    Need help. Just worked on this for 6 hours straight and got all the way to the last video, and now I'm stuck with a number of problems.

    1. There is no automatic Animator option added to the list when I click "Add Property" for GameOverClip.

    2.When I drag the keyframes as a group away from frame 1 to stall before the animation starts, it takes the beginning of the animation with it, so the animation starts on the first keyframe, not the first frame.

    3. I added keyframes on the first frame just so it tells it to start there, but that created a new problem. Even though the alpha is at 0 on frame 1, and the alpha is at 0 at the beginning of the animation, it somehow still changes between them when I push play.

    4. The GameOverClip is empty in my inspector, even though I saved it and created the animation. The HUDCanvas animation doesn't exist for me and it was just there for them in their animation folder without them saying how it got there.
     
  19. Muddasarmir

    Muddasarmir

    Joined:
    Nov 30, 2016
    Posts:
    2
    Hi, everyone. I am new in Unity and using Unity 5.4.2f2. I am at the phase 2 of survival shooter when after dragging the Lights from the Assets i got this error : "Integrate failed on Light Transport job" and it is like 999+ errors. i am searching this problem for round about 2 hours but didnt get any workinga answer. some said unchecked Baked Gi in Window>Lighting>Scene. Some said uncheck Auto at the ned of this lighting> scene panel.
    please help me, i am new and i am so tried in finding this error. beacuse of this error i cant even go in play mode as well.
    Please, help me as soon as possible, otherwise i am stuck here till the resolve of this error.
    kindly help me as soon as possible..
     
  20. BlackAceZero777

    BlackAceZero777

    Joined:
    Jul 27, 2016
    Posts:
    24
    Greetings,

    I am having a problem with posting my video game through the "Build" method. When I "Build" the game so that it can be played by others, I get a message telling me, "Error building Player because scripts have compiler errors." What is happening with the game scripts and what can I do on my end to fix it?
     
  21. Choc705

    Choc705

    Joined:
    Dec 25, 2016
    Posts:
    1
    Hello.
    So I was having this issue where my Zombunny would show the walking animation when I pressed play, but it wouldn't actually walk anywhere. I looks like it is just walking in place. Here is the EnemyMovement code that I have attached to the Zombunny:

    namespace CompleteProject
    {
    public class EnemyMovement : MonoBehaviour
    {
    Transform player;
    PlayerHealth playerHealth;
    EnemyHealth enemyHealth;
    UnityEngine.AI.NavMeshAgent nav;


    void Awake ()
    {

    player = GameObject.FindGameObjectWithTag ("Player").transform;
    playerHealth = player.GetComponent <PlayerHealth> ();
    enemyHealth = GetComponent <EnemyHealth> ();
    nav = GetComponent <UnityEngine.AI.NavMeshAgent> ();
    }


    void Update ()
    {

    if(enemyHealth.currentHealth > 0 && playerHealth.currentHealth > 0)
    {

    nav.SetDestination (player.position);
    }

    else
    {

    nav.enabled = false;
    }
    }
    }
    }


    This is the code I got with the download, so I don't know why it wouldn't work properly.
     
  22. BlackAceZero777

    BlackAceZero777

    Joined:
    Jul 27, 2016
    Posts:
    24
    Can somebody help me with this?
     
  23. luckyme

    luckyme

    Joined:
    Dec 30, 2016
    Posts:
    2
    The problem was most likely in the CameraFollow script. The Start() function wasn't firing and/or the offset variable was not being set. If anyone else has this issue, make sure the function has a capitol 'S'.
     
  24. kaigp97

    kaigp97

    Joined:
    Jan 2, 2017
    Posts:
    1
    problem CameraFollow someone help me
     

    Attached Files:

  25. Andreas24524

    Andreas24524

    Joined:
    Jan 6, 2017
    Posts:
    3
    upload_2017-1-6_21-45-35.png

    Any idea what to do when the floor looks like this? The lighting also doesn't look as ambient as in the tutorial-video.
     

    Attached Files:

  26. Mell00

    Mell00

    Joined:
    Dec 21, 2016
    Posts:
    1
    Greetings,

    I have the same problem as Andreas24524 except for the black shapes appearing which I suggest you to turn off the mesh renderer of the quad object representing the floor.

    My problem is that the lighting, as Andreas mentioned, doesn't look as ambient as in the tutorial videos, the game is blue-ish instead of being dark, and I don't have any shadows on any object which is weird, I removed the default directional light as advised in the pdf file but did not solve the problem.

    Any help would be much appreciated.
     
  27. Andreas24524

    Andreas24524

    Joined:
    Jan 6, 2017
    Posts:
    3
    After trying what was suggested early on in the thread (Page 1), namely going to "Window > Lighting > Lightmaps" and disabling the "Continuous Baking" checkbox, and then pessing "Bake", the editor crashes and I get this error:

    upload_2017-1-7_10-30-45.png

    The issue does seem to have to do with the baking, as when I open the project everything looks fine until the blue progress bar at the bottom right completes the baking. When the baking is complete, the spots appear. I also noticed that if I uncheck the "Lights" gameobject checkbox (seen at the top left of the Inspector tab in my screenshot) and then check it again, everything looks good until after a few seconds.

    I have also already deleted the mesh renderer of the quad object representing the floor, so that is unfortunately not it... :/

    Any help appreciated!
     
  28. Andreas24524

    Andreas24524

    Joined:
    Jan 6, 2017
    Posts:
    3
    I'm not sure if your problem is the same as mine but I've found a solution that works for me, maybe it will work for you and others as well?
    Anyways, do as I did in my last post (go to Window>Lighting>Lightmaps and disable continuous baking and click 'Bake') BUT, before you do that, you should select all your gameobjects in the Hierarchy (SHIFT + Click to select all) then disable them so they are not visible in the scene view. Doing this made the problem disappear. :)
    Best of luck!
    upload_2017-1-8_12-26-11.png
     

    Attached Files:

  29. Eimantas1

    Eimantas1

    Joined:
    Nov 29, 2015
    Posts:
    3
    Hi, I have no bugs this was quite a nice and simple tutorial that I very much enjoyed. Although I was wondering about which programs where the assets created and rigged on? I think it looks very nice and I would like to make a game with similar art style (With different characters of course), thanks.
     
  30. Kardonis

    Kardonis

    Joined:
    Jan 23, 2017
    Posts:
    1
    So I'm stuck. I read through every page here, and apparently this has never happened to anyone.

    I just finished phase 4, the first enemy creation, and I have a very peculiar issue. When I enter the game to test, my enemy sprite stays perfectly still, while its rigidbody moves and acts, while invisible, exactly how the code wants it to. It seeks out the player and collides, seeming like the player is being pushed by nothing. I have no idea how this happened or how to deal with it. Any help would be greatly appreciated.
     
  31. MeZoPredatoR

    MeZoPredatoR

    Joined:
    Jan 24, 2017
    Posts:
    1
    I'm having an issue on part 4 where the zombunny is stuck in place. the move animation is playing but the bunny itself will not move... i can't figure out why. any help would be greatly appreciated
     
  32. Eimantas1

    Eimantas1

    Joined:
    Nov 29, 2015
    Posts:
    3
    Make sure that the character Avatar is chosen on the same object as where the rigidbody is used in the inspector. The avatar should be chosen in the animator if I recall correctly. I do not know if that is the issue but you might aswell try.
     
  33. Eimantas1

    Eimantas1

    Joined:
    Nov 29, 2015
    Posts:
    3
    I had a similar problem not sure what my exact fix was. I think one of the reasons was because I didn't attach the particle system on the Zombunny within the scene so it had some error with the script. Double check everything you may find the issue, make sure it is selected on shootable in the inspector and everything like that. One mistake and the script may have an error trying to make the object move.
     
  34. edemirci

    edemirci

    Joined:
    Feb 2, 2017
    Posts:
    7
    Great tutorial.

    However I'd like to mention that the overall feeling I had while watching this was nothing but cringe! Seriously, why is it every time the American talks, Will just acts like the American's side information wasn't relevant, or necessary. Seriously, watch and listen, every single video, while Will or the other UK guy is talking, and the American jumps in to add some VALUABLE information, they just carry on, no addition, no comment, no nothing. as if the American didn't even say anything. It's absolutely apparent in Video 5 at 7:20 where the American explains that the pivot/position is explained right at the top (in case you forget), and Will tries to talk over him, and then as the last syllable is coming out of the American's mouth, Will just picks up. Again in Video 5, at 9:09, when the American explains WHYYYYYY the Heart is at the bottom (again valuable) and Will, again at the last syllable just picks up talking. You can hear the American exhale loudly being annoyed because Will is obviously being rude towards the American. Also, Will does NOT, I repeat, does NOT do this with with other UK guy. Period!

    SO Will, why is this? Why don't you tell us? When I watch a tutorial, I'd rather have the party presenting be in tune with each other, instead of you making it cringe-like. It makes the learning experience much more effective. Take some notes with this next time you make a video.

    One more thing, the American and the other UK guy actually explain and inform much better than Will does.
     
  35. Deleted User

    Deleted User

    Guest

    This is out of place here; you should sent "Will" a pm.
     
  36. adhochero

    adhochero

    Joined:
    Feb 2, 2017
    Posts:
    43
    i have a quesiton about part 9, the spawning.

    right at the beginning he said to click zombear in prefabs folder. but my prefabs folder doesnt have the zombear in it, my zombear is in the models/character folder.

    but it doesn't have all the components as their prefab zombear.

    am i missing something?
     
    Last edited: Feb 4, 2017
  37. Redbeardie

    Redbeardie

    Joined:
    Feb 6, 2017
    Posts:
    1
    Hello

    I just started the tutorial but I can't seem te find the scenes folder when I create a new scene and then save scene as. In the video the folder should already be there but it isn't. Could you someone help me out?
     
  38. Deleted User

    Deleted User

    Guest

    Just create it.
     
  39. teQoo

    teQoo

    Joined:
    Sep 18, 2015
    Posts:
    1
    Hello
    I have problem in lesson 2.
    move animation is not walking in game playing.
    only replay Idle animation.
    i try twice follow tutorial video but is not walking yet.
    I use Unity 5.5.0f3(64bit) version
    I think 5.5 version change animator controller. video tutorial example is not explane how use exit entry and green Entry box
    how can i solve this problem.
    I'm bad English. English is not my First langage
     
  40. Dawbzz

    Dawbzz

    Joined:
    Jan 26, 2017
    Posts:
    3
    Hey I just finished step 8 for scoring points so when the tutorial is asking for me to add the zombear in the game. A null reference exception is popping up even though it has the same code as the zombunny.
    Just not sure why its not working since everything is just copied and pasted
     
  41. Dawbzz

    Dawbzz

    Joined:
    Jan 26, 2017
    Posts:
    3

    Is your "Has Exit Time" box have a check mark in the animator when you click on your transition?
    if its checked just uncheck it because it delays your animation
     
  42. galangarbis

    galangarbis

    Joined:
    Feb 11, 2017
    Posts:
    1
    Can you help me, i was finished follow video part 2, Player Character, and i don't know what wrong with my code, because i check my code it's true with your tutorial, but my Character not showing the effect of Move..
     
  43. alexjr1194

    alexjr1194

    Joined:
    Feb 3, 2017
    Posts:
    4
    thanks this really helped I looked back at my script and it was the smallest spelling mistake that did this
     
  44. BuckBuchanan

    BuckBuchanan

    Joined:
    Feb 16, 2017
    Posts:
    4
    I really like the extra lighting effects added in the souped-up Unity 5 "Complete-Game" scene. I especially like the way each enemy glows. I've examined the Prefabs and models for these objects and I can't figure out how this point light source was actually added. Where is it in the object hierarchy?
     
  45. BuckBuchanan

    BuckBuchanan

    Joined:
    Feb 16, 2017
    Posts:
    4
    When I got to this part of the tutorial I just created my own ZomBear and Hellephant prefabs. I started by dragging ZomBear and Hellephant models to the Hierarchy. Then I went to my Zombunny Prefab and

    1) Copied all the missing components one by one to the other two Game Objects.
    2) Updated the sound variables to use different hurt and death sounds.
    3) Enlarged the Sphere and Capsule colliders on the Hellephant.
    4) Set the two new Game Objects to be in the "Shootable" layer.
    5) Dragged the HitParticles Prefab onto each new game object
    6) Dragged the new objects to the Prefabs folder and deleted them from the Hierarchy.

    I was able to proceed with the rest of the tutorial after that and everything worked as expected. Make sure that you set the correct Animation Controller for the ZomBear and the Animation Override Controller for the Hellephant.
     
    rodneya63 likes this.
  46. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    If you dig into the prefab you'll find it here:


    Nothing particularly complex, it's just parented to the root of the character's rigged mesh!
     
  47. BuckBuchanan

    BuckBuchanan

    Joined:
    Feb 16, 2017
    Posts:
    4
    Consider my forehead smacked. Thanks!

    Edit:

    It looks like the only way to see this is by dragging a Prefab into the Hierarchy. If you are browsing the Prefab in the project window the nested Point light is completely undetectable! So to add these to the existing prefabs you need to do the following:
    1) Drag the prefab into the hierarchy
    2) Open the disclosure and select the Zombear rigged mesh
    3) Add the point light as a child of the rigged mesh
    4) Select the main ZomBear object in the hierarchy
    5) Hit the "Apply" button in the inspector

    This does add the Point light to the Prefab.
     
    Last edited: Feb 17, 2017
  48. imthemonster

    imthemonster

    Joined:
    Mar 4, 2017
    Posts:
    7
    I followed the tutorial and it worked out fine, however in mine it does not have the hellephant prefab. The zombunny and the mockery work perfectly, but I follow the same tutorial to do the hellephant, but instead of the hellephant dying and disappearing (sinking), it stands still, without action, and although it makes the sound of hurt, I can not shoot anymore (Raycast does not allow it). It gives the following errors:

    NullReferenceException: Oject reference not set to an instance of an object EnemyMovement.Update () cs: 23
    Cs23 if (enemyHealth.currentHealth> 0 && playerHealth.currentHealth> 0)

    NullReferenceException: Obection references not set to an instance of an object
    EnemyHealth.takeDamagege (Int32 amount, Vector3 hitPoint) cs: 49
    HitParticles.transform.position = hitPoint;

    NullReferenceException: Object reference not being an instance of an object
    PlayerShootingShoot () (at Assets / Scripts / Player / PlayerShooting.cs: 76
    Cs 76 enemyHealth.TakeDamage (damagePerShot, shootHit.point);
    PlayerShootingUpdate () (at Assets / Scripts / Player / PlayerShooting.cs: 37
    Cs37 Shoot ();

    What should i do??
     
  49. imthemonster

    imthemonster

    Joined:
    Mar 4, 2017
    Posts:
    7
    About the error
    NullReferenceException: Oject reference not set to an instance of an object EnemyMovement.Update () cs: 23

    Cs23 if (enemyHealth.currentHealth> 0 && playerHealth.currentHealth> 0)

    I changed the && for ||

    Cs23 if (enemyHealth.currentHealth> 0 || playerHealth.currentHealth> 0)

    About the others errors, i was forgetting to insert HitParticles into the Hellephant.
     
  50. imthemonster

    imthemonster

    Joined:
    Mar 4, 2017
    Posts:
    7
    How can i put this emission light into the monsters?