- Home /
Fight game with punch and kick using keyboard inputs.
I am making a fight game and i want my character to left punch, right punch and kick using keyboard buttons. I have the animations for the three actions. So please tell me how to take keyboard input to perform the actions. NOTE: I dont have any knowledge about c# or scripts
Answer by Ambrose998800 · Sep 28, 2015 at 06:09 PM
I use JavaScript, wrote that way a interaction system in the complexity of DayZ in four months from scratch with no knowledge of javascripting. Learning by doing with tutorial impressions and a lot of try & error works for me.
Work with the Scripting API library to get out the possibility of Unity-Scripting.
http://docs.unity3d.com/ScriptReference/Input.GetKey.html
Some study from university in informatics/linear algebra/analysis are very helpfull for basics. Also knowledge of stereometry, vector handling and logical operations. Else try some basic logic operations with blenders logicbricks for starting.
http://wiki.blender.org/index.php/Doc:2.4/Manual/Game_Engine/Logic
Short - basics for keyboard using:
 function Update(){ //"Update()" makes this function every frame working
 
     if(Input.GetKeyDown(KeyCode."SomeKey")){ //Asks if "SomeKey" is pressed
 
        //Do what you want by pressing "SomeKey"
 
     } //close if-statement
 
 } //close Update() again
Your answer
 
 
             Follow this Question
Related Questions
Switching characters in-game 3 Answers
How to make a 3rd person character controller 0 Answers
How do i prevent my Player from sliding when i stop walking? 1 Answer
Hungry Shark Evolution Movement 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                