Search Unity

Unity 3 Video Training Course (FREE) - Walker Boys

Discussion in 'Community Learning & Teaching' started by profcwalker, Dec 8, 2010.

  1. TehPudding

    TehPudding

    Joined:
    May 7, 2013
    Posts:
    2
  2. Neil_young2k5

    Neil_young2k5

    Joined:
    Aug 11, 2013
    Posts:
    11
    Thanks for the tutorial. Help me a lot a understand the Unity.

    I am from Brazil and my english is weak

    In Unity Course Lab 2 i am stuck in the Live Counter:


    Script player
    Script Asteroid
    But show this: BCE0019: 'Lives' is not a member of 'UnityEngine.Component'.


    How to solve?

    Note: I use the Unity 4.
     
  3. Neil_young2k5

    Neil_young2k5

    Joined:
    Aug 11, 2013
    Posts:
    11
    The same error ocurrored in the next part.

     
  4. RenegadeNinjaNL

    RenegadeNinjaNL

    Joined:
    May 23, 2013
    Posts:
    22
    To subtract the lives, you have to call the Scene Manager game object, not the script. At the moment you are calling the script bny using GetComponent, hence why it is not working. When you call the game object, you can then call the function to subtract the life, or you could do it your way and subtract the life manually. The code below should fix the error:
    Code (csharp):
    1.  
    2. // Call function to subtract life
    3. sceneManager.GetComponent("sceneManager").SubtractLife();
    4.  
    5. // Manually subtract the life
    6. other.GetComponent("sceneManager").Lives -=1;
    7.  
    If you have not created a scene manager yet, then replace sceneManager with whatever you have called your player game object.

    You are making the same error as before. You are calling a script instead of the Game Object. To call the function, you have to get the game object that has got the script attached to it. Also, when you call a function, you do not have to put in transform. Transform is used to move a object around the scene. So the correct solution for this would be:
    Code (csharp):
    1.  
    2. sceneManager.GetComponent("sceneManager").AddScore();
    3.  
    Hope this fixed your errors.
     
  5. RenegadeNinjaNL

    RenegadeNinjaNL

    Joined:
    May 23, 2013
    Posts:
    22
    For everyone wondering about the course, yes it is over two years old but everything you learn is still applicable to Unity 4.x. I recently completed the course (July 2013) and all the assets that were provided were working. There were one or two minor errors, but they were easy to fix with the debugger.

    To sum up, I recommend this course especially if you are starting with Unity or game developing in general.
     
  6. Neil_young2k5

    Neil_young2k5

    Joined:
    Aug 11, 2013
    Posts:
    11
    Thanks RenegadeNinjaNL for helping me but the line did not work.

    Shows the same error

    In the tutorial I follow the same steps (4:30)
    http://vimeo.com/19463171


    I'm in Part 32 of the Lab Course 2 and the only thing that unable to make was "GetComponent".
     
  7. RenegadeNinjaNL

    RenegadeNinjaNL

    Joined:
    May 23, 2013
    Posts:
    22
    Are you sure your script is called "Script player" and not "script player"?
    Other than checking the spelling of the script you are trying to call, I am not too sure what the error could be without seeing the rest of the code.

    Sorry that I could not be more help.
     
  8. Neil_young2k5

    Neil_young2k5

    Joined:
    Aug 11, 2013
    Posts:
    11
    Hi, I took a screenshot:

    $UNITY 2.jpg $Unity1.jpg $UNITY3.jpg
     
    Last edited: Aug 14, 2013
  9. RenegadeNinjaNL

    RenegadeNinjaNL

    Joined:
    May 23, 2013
    Posts:
    22
    delete the line:
    Code (csharp):
    1.  other.GetComponent("Script player").Lives -= 1;
    as you are already calling the SubtractLife() function right below it. The SubtractLife function should minus the lives by 1. But check the spelling of the SubtractLife function because it seems there might be a spelling error. Below is a screenshot of how my script looks like.
     

    Attached Files:

    Last edited: Aug 15, 2013
  10. South

    South

    Joined:
    Aug 26, 2013
    Posts:
    4
    Hey Guys,

    Sorry If this is a obvious question, but I have got up to the tutorial video 18 before leading onto the video 30 (Unity Application, Tools, UI, Workflow Videos 1 - 60)

    Currently I've just started using Unity so I'm trying to learn the basics.

    Where do you find the flatting height map function ? I can't seem to find it anywhere.

    And also how do you import and export height maps ? I know there's an "Import/Export Package" but this isn't really what the Tutorial is quite on about.

    Tutorial video : http://vimeo.com/channels/151501/17226352

    Considering these video's are dated I knew thing's would be moved around since this is now Unity 4 but I can't seem to find some thing's stated within the Tutorial.

    Once again sorry if this is a silly question and if i'm over looking something so easy.
     
    Last edited: Aug 26, 2013
  11. TheFrozenFires

    TheFrozenFires

    Joined:
    Jul 5, 2013
    Posts:
    8
    Hey guys

    I'm doing the mario one with the latest unity, but I get compiler errors, does anyone know how to fix? I tried replacing them with .activeSelf and .activeInHierarchy

    Assets/2D Mario Assets/Scripts/screenShapeWipe.js(31,28): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.

    Assets/2D Mario Assets/Scripts/screenShapeWipe.js(32,28): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.

    Assets/2D Mario Assets/Scripts/screenShapeWipe.js(100,23): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.

    I also have errors in the screenshapewipe.js
     
  12. adbc

    adbc

    Joined:
    Oct 28, 2012
    Posts:
    1
    Hey everyone,

    Excellent tutorials by the Walker Boys. By far the most useful complete/ broad scoped tutorials I found for using Unity. I skipped around a bit through the different labs as I already had some experience with Unity and I also have a full time nongame programming job, so I'm already proficient on the programming side. But without further ado here is my Lab 5 with a catch. I built it for Android and it can be downloaded from Google Play. I also don't think I actually met all the requirements for completing the lab, but I did satisfy my goals. Who knows, I may go back and touch it up a little if I get positive feedback and/or release the code/project if people think that would be useful.

    The thing I struggled most with was the CharacterController. I really wanted it to be possible to have a moving block push Mario. I eventually got it working to my liking by using a bunch of hacks, but I wish I would have just converted Mario to use a RigidBody, that would have been a much more elegant solution. In the end I didn't even include this mario pushing block in this build, but just wanted to share some of my frustration with using CharacterController while trying to have rigidbodies affect it with realistic physics, so that hopefully someone else doesn't go through that trouble.

    I hope you guys enjoy it and I appreciate any feedback:)

    https://play.google.com/store/apps/details?id=com.kb.mario

     
  13. Neil_young2k5

    Neil_young2k5

    Joined:
    Aug 11, 2013
    Posts:
    11
    Sorry for the delay.

    I changed today and it worked perfectly.


    thanks for the help RenegadeNinjaNL. And thanks Walker Boys.


    :p
     
  14. Neil_young2k5

    Neil_young2k5

    Joined:
    Aug 11, 2013
    Posts:
    11
    Last edited: Sep 1, 2013
  15. Mucus

    Mucus

    Joined:
    Oct 22, 2012
    Posts:
    2
    Hey Guys.

    Does anyone know why in lab 5 Mario can only jump once, can't run, can't crouch or walk?

    P.S. I running Unity 4.2.1
     
    Last edited: Sep 6, 2013
  16. tra2002

    tra2002

    Joined:
    May 11, 2011
    Posts:
    142
    @Mucus once you go through the tutorial videos you will be able to do crouch, all jumps ect
     
  17. Rick-Miranda

    Rick-Miranda

    Joined:
    Jul 24, 2013
    Posts:
    4
    Hi. I'm checking out the content to see if I will start maybe taking some of these tuts.
    Anyone know if any of these cover srolling backgrounds. I looked around the space shooter tut but didn't see where they would have covered the scripting of the scrolling background...
     
  18. Valente11

    Valente11

    Joined:
    Sep 20, 2013
    Posts:
    12
    Hello,

    So I'm trying to start the 2D Mario clone tutorial but I can't seem to download the provided project files. The mirror provided by Walker Boys leads to Rapidshare which then links to a 'File Not Found'. The same is the case for the 3D Mario clone. Is there a different place to download these files? I realize that the tutorial might be outdated, but since I'm still learning the very basics, I'd like to go through it anyway. Thanks in advance.
     
  19. lokeshvt

    lokeshvt

    Joined:
    Oct 1, 2012
    Posts:
    3
    Hey there, any chance you have the tutorials in C#?
     
  20. MARKSTEPHEN

    MARKSTEPHEN

    Joined:
    Sep 24, 2013
    Posts:
    1
    It seems a few of us were having issues downloading the 2D Mario Clone file, myself included...This was perhaps an intermittent server issue with Rapidshare because I'm downloading the project file as I type this. Get it while it's there ;)

    If someone needs it I'll share. Just PM or reply in the thread.
     
  21. Valente11

    Valente11

    Joined:
    Sep 20, 2013
    Posts:
    12
    yes, it's been cleared up. Thanks for letting me know!
     
  22. wimlore

    wimlore

    Joined:
    Sep 24, 2012
    Posts:
    1
  23. DioMuller

    DioMuller

    Joined:
    Oct 8, 2013
    Posts:
    3
    Hello! My name is Diogo, and I'm learning Unity for an augmented reality project (for my day job) and to create games (my hobby). I'll probably do the labs on my free time on the job.

    Here's the link for the first lab:
    http://diogomuller.com.br/blog/?p=9#more-9

    I'm using Unity Pro Trial, for now (since I need camera access for my day job project).
     
    Last edited: Oct 30, 2013
  24. Java

    Java

    Joined:
    Oct 3, 2013
    Posts:
    44
    I was told I should watch these videos if I am new to Unity3d. But these are in JS and I want to use C#. Would these still benefit me since I won't be going along?
     
  25. DioMuller

    DioMuller

    Joined:
    Oct 8, 2013
    Posts:
    3
    Java, I'm following the tutorials, but using C#. Yes, there's benefit, 90% of the code (classes, method names, attributes) is the same, in this case. There are a few different things, but nothing a two minutes google search can't solve.
     
  26. DioMuller

    DioMuller

    Joined:
    Oct 8, 2013
    Posts:
    3
    Last edited: Oct 30, 2013
  27. jlarmesto

    jlarmesto

    Joined:
    Jul 22, 2013
    Posts:
    4
  28. therebecookies

    therebecookies

    Joined:
    Oct 31, 2013
    Posts:
    1
  29. douglinley

    douglinley

    Joined:
    Nov 7, 2013
    Posts:
    5
    I just found this course yesterday and I've been going through the first set of videos. Everything is great so far, but I'm a little curious what happened to videos 01-19 through 01-29. I tried checking to see if they were just of order in the album, but they appear to be gone altogether. Any one know what they covered or where I can find them?

    Edit: Nevermind. It looks like the naming is just inconsistent. There is an easy to follow list here: http://www.walkerboystudio.com/html/unity_training___free__.html#unity3software


    Thanks!
     
    Last edited: Nov 8, 2013
  30. ANTIDEAD

    ANTIDEAD

    Joined:
    Nov 13, 2013
    Posts:
    1

    Thanks for this post or I wouldn't have been able to find them myself either. I'm going through everything in order

    Are they still sending out the certificates to those who complete the course? Definitely would be cool to have that afterwards
     
  31. mishka33

    mishka33

    Joined:
    Nov 25, 2013
    Posts:
    1
    It's an amazing course for Unity! I'm studying the first set of videos now
     
  32. Walter Sullivan

    Walter Sullivan

    Joined:
    Sep 11, 2013
    Posts:
    1
    Sorry for the necro, but since I'm gonna try to learn unity and this tutorial seems to be really complete, I have a question:

    Is it okay for me, who never used Unity before, to start learning from this videos? I know they are a little outdated, specially because now there's all this 2D stuff on Unity 4.3 and everything, so I want to know if they are still good to go or if I should look for newer tutorials.
     
  33. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    Hello, I'm working on the point and click lesson and have hit a little roadblock I was hoping someone might be able to tell me what is wrong with my code. The error I'm receiving is

    Scene::raycastClosestShape: The maximum distance must be greater than zero!
    UnityEngine.Physics:Raycast(Ray, RaycastHit, Single)

    My code is:

    //Player Script

    //Inspector Variables
    var tagName : String; //allow the designer to setup a tag in the inspector
    var rayDistance : float = 0; //lenght of the ray for our raycast

    //Private Variables

    //Update is called every frame
    function Update ()
    {
    //use the mouse button to select on Game Objects in the screen
    if (Input.GetMouseButtonDown(0))
    {
    var hit :RaycastHit;
    var ray :Ray = Camera.main.ScreenPointToRay(Input.mousePosition); // get mouse position
    //casts a ray against all colliders in the scene
    if (Physics.Raycast (ray,hit,rayDistance))
    {
    if(hit.transform.tag == tagName)
    {
    var position = Vector3 (Random.Range(-6,6),Random.Range(-4,4),0); // new random position for game object
    hit.transform.position = position; // move the game object ot the new location
    }
    }
    }
    }
     
  34. tra2002

    tra2002

    Joined:
    May 11, 2011
    Posts:
    142
    rayDistance in the inspector set this to the distance you want. byt default you are setting it to 0 with var rayDistance : float = 0;
     
  35. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    omg how silly of me. I was so focused on my code that I for something as simple as setting things in the inspector. Thank you for much for your help
     
  36. tra2002

    tra2002

    Joined:
    May 11, 2011
    Posts:
    142
    @AgingPunk don't worry about it, it happens to us all :)
     
  37. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    OK, I've run into my next issue that I haven't been able to fix. I'm going through the space shooter tutorial and I thought I was beggining to understand the java script much better. I've been using the api reference as well to help me solve my own problems. Then I got stuck, lol.

    The error I am receiving is:
    Assets/Scripts/scriptAsteroid.js(27,52): BCE0019: 'lives' is not a memeber of 'UnityEngine.Component'

    Here is my code:
    Code (csharp):
    1.  
    2. //Asteroid Script
    3.  
    4. //Inspector Variables
    5. var asteroidSpeed : float = 6.0;
    6. var explosion : Transform;
    7.  
    8. //Private Variables
    9.  
    10.  
    11. function Update ()
    12. {
    13.     transform.Translate(Vector3.down * asteroidSpeed * Time.deltaTime); //
    14.    
    15.     //Check for the bottom of the screen
    16.     if (transform.position.y <= -5.7)
    17.     {
    18.         //Reset the position of the enemy
    19.         transform.position.y =6;
    20.         transform.position.x = Random.Range (-8.3, 8.3);
    21.     }
    22. }
    23.  
    24. function OnTriggerEnter (other : Collider)
    25. {
    26.     if(other.gameObject.tag == "Player")
    27.     {
    28.         other.GetComponent("scriptPlayer").lives-=1;  //ERROR:
    29.         //other.gameObject.GetComponent("scriptPlayer").lives-=1;     //ERROR: suggested as replacement for line above
    30.     if(explosion)  
    31.     {  
    32.         Instantiate (explosion, transform.position, transform.rotation);  // Supposed to create explosion on contact with "Player" NOT currently functioning?
    33.     }
    34.    
    35.     transform.position.y =6;
    36.     transform.position.x = Random.Range (-8.3, 8.3);
    37.     }
    38. }
    39.  
    My player script is called scriptPlayer.js

    Code (csharp):
    1. //Player Script
    2.  
    3. //Inspector Variables
    4. var lives           : int = 3;
    5. var playerSpeedHorizontal   : float =10;
    6. var projectile              :Transform;
    7. var socketProjectile        :Transform;
    8.  
    9.  
    10. //Private Variables
    11. private var dir : float;
    12.  
    13.  
    14. //
    15. function Update ()
    16. {
    17.     //Move Player Based on input
    18.     var dir : Vector3 = Vector3.zero;
    19.    
    20.    
    21.     dir.x = -Input.acceleration.x;
    22.     dir.y = -Input.acceleration.y;
    23.    
    24.    
    25.    
    26.     // clamp acceleration vector to unit sphere
    27.     if (dir.sqrMagnitude > 1)
    28.         dir.Normalize();
    29.        
    30.         dir *=Time.deltaTime;
    31.        
    32.         //Move Object
    33.         transform.Translate (dir*playerSpeedHorizontal);
    34.  
    35.         //Player position is equal to 'x' then number equals 'x'
    36.         if (transform.position.x >= 8.3)
    37.             transform.position.x = 8.3;
    38.         if (transform.position.x <= -8.3)
    39.             transform.position.x = -8.3;
    40.         if (transform.position.y >= 4.4)
    41.             transform.position.y = 4.4;
    42.         if (transform.position.y <= -4.4)
    43.             transform.position.y = -4.4;
    44.            
    45.         //create a bullet
    46.  
    47.     for (var i = 0; i < Input.touchCount; ++i)
    48.     {
    49.             if (Input.GetTouch(i).phase == TouchPhase.Began)
    50.             {
    51.                 Instantiate (projectile, socketProjectile.position, socketProjectile.rotation);
    52.             }
    53.     }
    54. }
    55.  
    56. function OnTriggerEnter (other : Collider)
    57. {
    58.     if(other.gameObject.tag == "asteroid")
    59.     {
    60.         lives -= 1;
    61.        
    62.     }
    63. }
     
    Last edited: Jan 11, 2014
  38. profcwalker

    profcwalker

    Joined:
    May 3, 2009
    Posts:
    243
    Hi AgingPunk,

    If I remember correctly, you'll want to declare your variable as public so that the GetComponent can access it. :)

    public var lives : int = 3;

    Hope that helps.
    Have fun!
     
  39. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    Thank you for your quick reply. However, that was not the fix :-(
     
  40. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    I was able to work around the problem by using the function from within my player script to subtract lives when colliding an asteroid. But, I would still like to understand why I am getting that error when trying to call the script
     
  41. softwizz

    softwizz

    Joined:
    Mar 12, 2011
    Posts:
    793
    Last edited: Jan 11, 2014
  42. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    Thank you softwizz for your reply. That code did seem to fix my problem!!!!. Thank you though for the post link. I have edited my OP with proper code tag
     
    Last edited: Jan 11, 2014
  43. AgingPunk

    AgingPunk

    Joined:
    Jul 25, 2013
    Posts:
    10
    If I run the following code I recieve the error Input Axis is not setup. I looked in Edit, Project Settings, Input then under horizontal and vertical They have negative and postive buttons listed and Type: key or mouse down. What do I need to set ?

    Code (csharp):
    1. //Inspector Variables
    2. //var lives         : int = 3;                  //Number of lives for player
    3. var playerSpeedVertical     :float      =10;    //Player Speed Vertical
    4. var playerSpeedHorizontal   :float      =10;    // Player Speed Horizontal
    5. //var horMin                    :float      =-6.0;  // Limits for player movement left
    6. //var horMax                    :float      =6.0;       // Limits for player movement right
    7. //var verMin                    :float      =-4.0;      // Limits for player movement down
    8. //var verMax                    :float      =4.0;       //Limits for player movement up
    9. //var projectile                :Transform;         //Load projectile
    10. //var socketProjectile      :Transform;         // Load bullet start point
    11. //var numberOfShields           :int        = 4;    //Set Number of Shields
    12. //var shieldMesh                :Transform;
    13. //var shieldKeyInput            :KeyCode;
    14.  
    15. //Private Variables
    16.  
    17. //private var shieldOn      :boolean    =false;
    18.  
    19. //Game Loop
    20. function Update ()
    21. {
    22.     var transV : float = Input.GetAxis("Vertical" *(playerSpeedVertical *Time.deltaTime));      //use to store variable for vertical movement
    23.     var transH : float = Input.GetAxis("Horizontal" *(playerSpeedHorizontal *Time.deltaTime));  //use to store variable for horizontal movement
    24.    
    25.     //Move Player Based on input
    26.     transform.Translate (transH, transV, 0);    // Here we use the x to move left and right and the y to move up and down
    27. }
    28. //  // Create Limits for the player world
    29. //  transform.position.x = Mathf.Clamp(transform.position.x, horMin, horMax);   //set horizontal limits
    30. //  transform.position.y = Mathf.Clamp(transform.position.y, verMin, verMax);   //set vertical limits
    31. //
    32. //         
    33. //  //create a bullet
    34. //  if(Input.GetKeyDown("space"))
    35. //  {
    36. //      Instantiate(projectile, socketProjectile.position, socketProjectile.rotation);
    37. //      audio.Play();
    38. //  }
    39. //     
    40. //  //Create a shield
    41. //  if(Input.GetKeyDown(shieldKeyInput))
    42. //  {
    43. //      if(!shieldOn)
    44. //      {
    45. //          var clone= Instantiate(shieldMesh, transform.position, transform.rotation);
    46. //          clone.transform.parent = gameObject.transform;
    47. //          shieldOn = true;
    48. //      }
    49. //  }
    50. //}
     
  44. tra2002

    tra2002

    Joined:
    May 11, 2011
    Posts:
    142
    "Horizontal", "Vertical" have to be named correctly and it is case sensitive. Not looking at Unity at the moment but I believe by default they need to be "vertical", "horizontal" by default but you can look in the input manager to double check the spelling and case.
     
  45. Chimerique

    Chimerique

    Joined:
    Jan 17, 2014
    Posts:
    1
    Hi there, thanks for all your amazing tutorial, I'm desperatly trying to download the 2D Mario Clone, but impossible to find a viable link.
    Can some one point me out to a link for the original source ?

    Thx
     
  46. profcwalker

    profcwalker

    Joined:
    May 3, 2009
    Posts:
    243
    Hi Chimerique,

    Here's a dropbox link to it. Hope that helps. I'll check on the other links later. Thank you.
     
  47. IngridGalaxos

    IngridGalaxos

    Joined:
    Jan 25, 2014
    Posts:
    10
    Hi, I started your tutorials some time ago and I've just finished my first Lab Project. I really enjoyed working on it and have already started with the second project.
    You can find my first game on www.galaxosgames.com/shape-clicker/ .
    Thank you very much for the great tutorials!

    Ingrid
     
    Last edited: Jan 26, 2014
  48. IngridGalaxos

    IngridGalaxos

    Joined:
    Jan 25, 2014
    Posts:
    10
    I liked the second Lab Project (Space Shooter) very much and have just published it on my website. I learned a lot from this project and I am looking forward to the next project. You can find the information about the game, and play it on www.galaxosgames.com/space-shooter/. I hope you like it!

    Ingid
     
  49. Cshort

    Cshort

    Joined:
    Feb 10, 2014
    Posts:
    1
    i am having trouble adding the score from the time on the 2d mario i need help with this please
     
  50. inoshipotyanin

    inoshipotyanin

    Joined:
    Feb 14, 2014
    Posts:
    1
    Hello. Sorry me, I bad speak English.

    In quest "video 4 03 assets particle" of "Particle System" in my (Unity 4.3.) Fails to set the border for their movement and in general, if I change something in the "Ellipsoid particle emitter" that it does not make any changes. What may be the reason? How can I solve this problem?