Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
XDGabzXD

Hold button to repeat anim?

Question

So i have some fps legs, and lots of different charecters, these legs have crouch animations and walking animations and running animations. I am going to import them into unity and start scripting for when the player crouches and that, but what i need to do is when the player holds down 'w' then it keeps repeating the walk animation until he is no longer holding 'w' so i can't do this with just 'ifgetkeysdown('w'){}'? And then i would need to make the thing for if they are holding 'w' and then they hold leftshift at the same time then it plays the running animation. Does anyone know call for holding the buttons? (:

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0
Please login or register to see this quote.

here is almost everything you need to know:

Please login or register to see this link.

Share this post


Link to post
Share on other sites

  • 0

im not a pro in animations but maybe in the script you should put a part on the script that when you push W the animations start, when you stop holding W the animation stops! just have some imagination ;)

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

All he need is to "loop" animation and it can be done via script (or manually setup in import settings).

Via script:

Please login or register to see this code.

Share this post


Link to post
Share on other sites
  • 0

eco4, i knew how to do it hahah, i was just asking for the call function in the script to repeat the animation until w is no longer being held (:

Share this post


Link to post
Share on other sites
  • 0

not for you but yes for me!(everyone says that a good game maker(designer, programmer etc) needs to have a good imagination ;))

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...