Results 1 to 3 of 3
  1. #1
    ResistanceRage's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Location
    Sweden, Malmö
    Posts
    151
    Reputation
    10
    Thanks
    47
    My Mood
    Happy

    Question Need help| Annoying Error in Unity 4.0

    So i'm gonna make this thread short if u need more information just ask this is really annoying how can i fix it?


    Here is my script code ( i just started making it and i noticed that when i press the fire1 mouse button it can't find animation
    )

    -------------------------------------------------------

    function Update (){
    if (Input.GetButtonDown("Fire1"))

    animation.Play("shoot1");


    }

    -------------------------------------------------------------

    I've attached a photo...

    I see this section isn't very active hope someone can help...
    Attached Thumbnails Attached Thumbnails
    Skärmklipp.JPG  

    My signature sucks...

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Please show your folder / file structure layout

    ie.

    C:\Unity\
    C:\Unity\MyGame1\
    C:\Unity\MyGame1\resources
    C:\Unity\MyGame1\resources\weapons
    Where is the 'shoot1' file?
    Where is MyGame1.exe?

    etc etc. however you have your folders made up.


    How do you "add" shoot1 to the game? Via engine editor or script code? Post that too if applicable.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    Seb's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Hitting on your girl
    Posts
    1,066
    Reputation
    21
    Thanks
    486
    My Mood
    In Love
    Quote Originally Posted by ResistanceRage View Post
    So i'm gonna make this thread short if u need more information just ask this is really annoying how can i fix it?


    Here is my script code ( i just started making it and i noticed that when i press the fire1 mouse button it can't find animation
    )

    -------------------------------------------------------

    function Update (){
    if (Input.GetButtonDown("Fire1"))

    animation.Play("shoot1");


    }

    -------------------------------------------------------------

    I've attached a photo...

    I see this section isn't very active hope someone can help...


    do it like this:

    var FireAnim : GameObject;

    function Update ()
    {

    if (Input.GetButtonDown("Fire1"))

    animation.Play("shoot1");


    }



    -------------------------------

    you have to add your anim to inspector and make sure its the same name as gameobject

Similar Threads

  1. [Help Request] I need Help with error
    By iKSAi in forum Alliance of Valiant Arms (AVA) Help
    Replies: 4
    Last Post: 06-28-2011, 01:26 AM
  2. [Help] working long knife, need help bypassing error
    By tdct in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 3
    Last Post: 01-01-2011, 08:41 PM
  3. Need help. Got errors from whits base.
    By eXaLtIc™ in forum Combat Arms Coding Help & Discussion
    Replies: 13
    Last Post: 11-10-2010, 05:56 AM
  4. Need Help From Error's?
    By Valken in forum CrossFire Help
    Replies: 3
    Last Post: 07-27-2010, 06:31 AM
  5. i need help with errors
    By EDWINSEE in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 07-23-2010, 02:20 AM

Tags for this Thread