I am working on a game and i wanted to know if anyone knew a script on how to run
Can you make it so its not unlimited sprint
Like your able to sprint for 3 sec then it automicaly stops and then you can re do it
Thank you very much
I am working on a game and i wanted to know if anyone knew a script on how to run
Can you make it so its not unlimited sprint
Like your able to sprint for 3 sec then it automicaly stops and then you can re do it
Thank you very much
Given the types of questions you’ve posed recently, I’d recommend that you run through the various tutorials and resources here: Unity Learn
And lookup the various scripting resources located in the board sticky: http://forum.unity3d.com/threads/19302-About-Scripting
Go over those, learn a bit, and make a concerted attempt at these things. At that point you should be able to ask us specific questions about your code and we’ll be happy to help.
What do i need to say to make it more specific
Isn’t there a scripted that can make you move faster.
for example if i move normal 2mph , if i click (x on the keyboard) will will upgrade me to 4mph for a limited time like 3sec then i will go back to the normal. ( then i can restart)
What is generally meant by ‘more specific’ is, ask a specific, technical question rather than just asking ‘how do I do X?’.
In other words, try to code it yourself, and then if you run into problems, post your code here and describe the problems that you’re having. If you don’t know where to start, then I suggest you take FizixMan’s advice, work through the various references and tutorials that are available, and focus on developing some basic coding skills before worrying about things like making a character run faster.
Meanwhile though, here are some hints. First, for determining whether a key or virtual button is down, look at Input.GetKey() and Input.GetButton(). As for increasing the speed of your character, that depends on how the motion of the character is being handled (e.g. directly by manipulating the transform, via a character controller component, via a rigid body component, etc.).
This might help:
http://www.unifycommunity.com/wiki/index.php?title=FPSWalkerEnhanced
It’s a script you place on your character that implements a couple of the standard first person shooter inputs.
Make sure you bookmark the wiki page so you can refer to it the next time you have issues and the standard documentation can’t help.
It’s always good to try code something first so that when people give you help you have a increased chance of understanding the solution, but… it never hurts to ask.
Thank you!