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

ETeeskiTutorials Scripts up to FPS1.16

Discussion in 'Community Learning & Teaching' started by eteeski, Dec 13, 2011.

  1. eteeski

    eteeski

    Joined:
    Feb 2, 2010
    Posts:
    476
    sounds like you need to adjust the input menu. edit > project setttings>input
     
  2. pugdug808

    pugdug808

    Joined:
    Jul 24, 2012
    Posts:
    3
    i fixed it
     
    Last edited: Jul 25, 2012
  3. Flappish

    Flappish

    Joined:
    Jul 24, 2012
    Posts:
    4
    I tried using the FPSWalker script as a movement script and using your MouseLookScript, it works well except for one problem, when i move the camera the playercapsule doesnt move with the camera, so if i turn 90 degrees to the right I move forward with the D-key, I hope this makes sense and I really hope you can help me, thnks!
     
  4. praveensuresh

    praveensuresh

    Joined:
    Jun 11, 2012
    Posts:
    5
    Are these tutorials available in c#??.....If pls share...:p
     
  5. uNiTySteve

    uNiTySteve

    Joined:
    Sep 5, 2012
    Posts:
    1
    Hey I have an problem on Gun Script. Here are my errors.

    Assets/GunScript.js(27,18): BCE0043: Unexpected token: .. which is linked to this code
    transform.position = cameraObject.transform.position + (Quaternion.Euler(0,targetYRotation,0) * Vector3(holdSide * racioHipHold, holdHeight * racioHipHold, 0));
     
  6. kingcharizard

    kingcharizard

    Joined:
    Jun 30, 2011
    Posts:
    1,137
    your video style is interesting.... I may watch these at some point just for fun..
     
  7. kenaochreous

    kenaochreous

    Joined:
    Sep 7, 2012
    Posts:
    395
    Hey eteeski, do you have any plans on making a C# version of your scripts?
     
  8. bronyponyfanatic

    bronyponyfanatic

    Joined:
    Oct 19, 2012
    Posts:
    1
    Hey Eteeski! I am loving your tuts but for some reason I get an error when using the movement script.. I typed everything perfect and get this error:

    NullReferenceException: Object reference not set to an instance of an object
    PlayerMovementScript.LateUpdate () (at Assets/Scripts/PlayerMovementScript.js:67)


    So i figured I typed something wrong, copy and pasted your movement and mouselook scripts.. same error... Help plz!?
     
  9. Funnynel42

    Funnynel42

    Joined:
    Oct 18, 2012
    Posts:
    11
    Thank you Eteeski!
    Thanks to you I finally understand a whole lot of new things in Unity.
    I have faced a lot of challenges like converting your javaScript to C# with a lot of effort, and added a few things like bulletholes are parented to the object they hit, and much more.
    And your AI system was exactly what I wanted to do in a game I'm making.
    Thank You!
     
  10. Gab Steve

    Gab Steve

    Joined:
    Nov 3, 2012
    Posts:
    33
    hey man ive been following ur tuts and ive seen that ther realllllyyy good ive setup a game so far but well i dont know scripting and stuff but i really wanted to team up with another person who knew it and could possibly teach me and help me create a cool fps so if ur intrested please reply cuz i really am desperate for help and a teammate ;) - Gab


    PS : ur tuts are beyond comprehension.
     
  11. Pikabob_Alex

    Pikabob_Alex

    Joined:
    May 20, 2012
    Posts:
    1
    Eteeski, thanks for all of your tutorials, man!
    Can you tell me how to make the rigidbody bullet instead of raycast?
    TQ
     
  12. eteeski

    eteeski

    Joined:
    Feb 2, 2010
    Posts:
    476
    thanksj :)
    same way you'd create a raycast bullet. just add a script to it that's like
    function Awake ()
    {
    rigidbody.AddRelativeForce(0,0,1000);
    }
     
  13. karwanit

    karwanit

    Joined:
    Dec 30, 2012
    Posts:
    3
    Very Very Nice
     
  14. el_rolas

    el_rolas

    Joined:
    Aug 6, 2012
    Posts:
    15
    How can I make a visible bullet?, like a fireball, i mean i want to make a gun that shoots fireballs instead normal bullets.
     
  15. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
  16. GreenMist

    GreenMist

    Joined:
    Feb 27, 2013
    Posts:
    2
    1 errors:
    Unassigned Reference Exeption: The variable cameraObject of 'PlayerMovementScript' has not been assigned
     
  17. GreenMist

    GreenMist

    Joined:
    Feb 27, 2013
    Posts:
    2
    error no camera object selected
     
  18. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Drag the camera object into the inspector.
     
  19. Dreprodigy

    Dreprodigy

    Joined:
    Apr 23, 2013
    Posts:
    4
    For some reason, once I parent the camera to the capsule. The camera shakes as the player moves. All of the codes work fine, its just this single issue. I ran into it b4 and ended ups starting over. I'd rather not go back to blender; this software seems more interesting.
     
  20. asadmehmood

    asadmehmood

    Joined:
    Jun 20, 2013
    Posts:
    1
    $asdasdasd.png
    did every thing you tell Problem during me in fps 1.23 but I got this exception
    "Exception : "Object reference not set to an instance of an Object"

    here is the changes of fps 1.23 I did in my Scripts

    PlayerMovementScript
    var currentGun : GameObject;
    var distToPickGun : float = 6;
    var throwGunUpForce : float = 100;
    var throwGunForwardForce : float = 300;
    var waitframeForSwitchGuns : int = -1;

    function Update () {
    waitframeForSwitchGuns -= 1;
    }

    GunScript

    var beingHeld : boolean = false;
    var outsideBox : GameObject;
    @HideInInspector
    var countToThrow : int = -1;
    @HideInInspector
    var playerTransform : Transform;
    var playerMovementScript : PlayerMovementScript;


    function Awake()
    {
    countToThrow = -1;
    playerTransform = GameObject.FindWithTag("Player").transform;
    playerMovementScript = GameObject.FindWithTag("Player").GetComponent(Play erMovementScript);
    cameraObject = GameObject.FindWithTag("MainCamera");

    }

    function LateUpdate () {

    if(beingHeld)
    {
    rigidbody.useGravity = false;
    outsideBox.GetComponent(Collider).enabled = false;
    //then I put my all other code here
    }
    if(!beingHeld)
    {
    rigidbody.useGravity = true;
    outsideBox.GetComponent(Collider).enabled = true;
    countToThrow -= 1;
    if(countToThrow == 0)
    rigidbody.AddRelativeForce(0,playerMovementScript. throwGunUpForce,playerMovementScript.throwGunForwa rdForce);


    // I got Exception In This Line
    if(Vector3.Distance(transform.position, playerTransform.position) < playerMovementScript.distToPickGun Input.GetButtonDown("Use Key") playerMovementScript.waitFrameForSwitchGuns <= 0)
    {
    playerMovementScript.currentGun.GetComponent(GunSc ript).beingHeld = false;
    playerMovementScript.currentGun.GetComponent(GunSc ript).countToThrow = 2;
    playerMovementScript.currentGun = gameObject;
    beingHeld = true;
    targetYRotation = cameraObject.GetComponent(MouseLookScripts).yRotat ion -180;
    playerMovementScript.waitFrameForSwitchGuns = 2;
    }


    }

    }

    Please Help i watched your video Hundreds of time but didn't find the error please help
    sorry for Bad English
     
    Last edited: Jul 14, 2013
  21. SaiNagata

    SaiNagata

    Joined:
    Jun 30, 2013
    Posts:
    2
    Thank You Very Very Very Very Very Very Very Muuuuuuuuuuuuuuuuuuuuuuuch......... :3
     
  22. MyIsaak

    MyIsaak

    Joined:
    May 23, 2013
    Posts:
    49
    Omg this is the best tutorial ever! Everything is completely explained and organized! Thanks for the tutorials... keep it up and ill subscribe you!
     
  23. edasert

    edasert

    Joined:
    Jul 26, 2013
    Posts:
    2
    thank you for these awesome tutorials and dedication!
    :p
    but I've got a problem;
    i get an error called null refference exception
    and it says:
    NullReferenceException: Object reference not set to an instance of an object
    PlayerMovementScript.LateUpdate () (at Assets/PlayerMovementScript.js:34)


    Also I can't walk around my scene and when i attach the camera object to the player movement script i get this other error;
    NullReferenceException: Object reference not set to an instance of an object
    PlayerMovementScript.LateUpdate () (at Assets/PlayerMovementScript.js:34)


    please help me!
     
    Last edited: Aug 1, 2013
  24. Ragegod5

    Ragegod5

    Joined:
    Jul 23, 2013
    Posts:
    2
    Hi eteeski I have a problem...
    on fps 1.13 everything works thanks to you amazing teaching skills but my bullet hole texture bugs out with the cubs texture (they dont have one)
     
  25. Dipol

    Dipol

    Joined:
    Feb 18, 2013
    Posts:
    8
    Hi!

    So I was following your "Basic Gun With Weight" tutorial. It was all going fine until I wrote the last line. I wrote exactly the same as him, but when I started the game, the right side of the gun faced the camera, not the back. It's been rotated 90 degrees on the x-axis. When I removed the last line everything worked as it used to. Please help!

    Here's the code (with the last line):

    var cameraObject : GameObject;
    @HideInInspector
    var targetXRotation : float;
    @HideInInspector
    var targetYRotation : float;
    @HideInInspector
    var targetXRotationV : float;
    @HideInInspector
    var targetYRotationV : float;

    var rotateSpeed : float = 0.3;

    var holdHeight : float = -0.5;
    var holdFront : float = 1;
    var holdSide : float = 0.5;

    function Update ()
    {

    transform.position = cameraObject.transform.position +(Quaternion.Euler(0, targetYRotation, 0) * Vector3(holdSide, holdHeight, holdFront));


    targetXRotation = Mathf.SmoothDamp( targetXRotation, cameraObject.GetComponent(MouseLookScript).xRotati on, targetXRotationV, rotateSpeed);
    targetYRotation = Mathf.SmoothDamp( targetYRotation, cameraObject.GetComponent(MouseLookScript).yRotati on, targetYRotationV, rotateSpeed);

    transform.rotation = Quaternion.Euler(targetXRotation, targetYRotation, 0);
    }

    Thank you for you time,
    Dipol
     
  26. Borzi

    Borzi

    Joined:
    Apr 13, 2013
    Posts:
    26
    My Player wont move from the spot and I am using these scripts. Any idea why? Help would be much appreciated, thanks for your tuts!
     
  27. sornax

    sornax

    Joined:
    Oct 5, 2013
    Posts:
    1
    hi eteeski i have a problem with the gun script from 1.8 when i go in the game than is the weapon not in the front the weapon is right
     
  28. Voidexx

    Voidexx

    Joined:
    Jan 20, 2014
    Posts:
    4
    Hey whats up, just found out about you and you have A lot of Good Feedback, problem is these videos were made 2 years ago, and im not to positive if everything would be the same. My other question is Do you have any ThirdPerson Tutorials
     
  29. Tear_gas

    Tear_gas

    Joined:
    Jan 23, 2014
    Posts:
    1
    Can some one help? Im having problems with the player movement script. When I try to move with the default settings it wont move. The player will only move if i set the setting to some ridiculously high number. Help please
     
  30. Shade277

    Shade277

    Joined:
    Jan 22, 2014
    Posts:
    1
    Hay there! 4th day in learning Unity3D and I`ve found your tutorial.

    privet var reallyHelpfull == true; // =)

    You`ve done a great job thank you much.
    From Russia with respect.

    P.S. Even my bear likes it! (IRL we don`t have pet bears here)
     
  31. Alanhhl

    Alanhhl

    Joined:
    Nov 28, 2013
    Posts:
    1
    Hay i have been following your vids and i really like them
    but imm, i copied the gun script that you have up top and when i checked it for any errs it says that there needs to be a ; at the end, but when i go and look at it, it already has a ; at the end.
    there is like 3 errs like that.
    if you can help out that would mean a lot to me
    thanks
     
  32. Knightman15

    Knightman15

    Joined:
    Apr 16, 2014
    Posts:
    1
    Hi, just was wondering why the movement, well, just doesnt work. There are no errors or anything, even when I copy and pasted the script it didnt work?
    Thanks Man, your tutorials really got me into scripting/game development!
     
  33. nandasasmita

    nandasasmita

    Joined:
    Dec 12, 2013
    Posts:
    3
    this tutorial is compactible with unity 4.3?
     
  34. YousafGrewal

    YousafGrewal

    Joined:
    Jul 5, 2018
    Posts:
    17
    The tutorials are soo amazing and helpful still in 2021