Language

How do you add animation to weapons and Add AI

I am not new to game design I have been designing games for about a year now but i've only used Cryengine, UDK, and Blender. Since I am new to Unity I only made a terrain with trees and water but I added a gun but don't know how to make it shoot or have kick. I also do not know how to add AI can someone please help me?

1 Reply

First of all, you have multiple questions here - please ask one question at a time if you want a good answer.

I'll try to get to each of your questions briefly here:

-How to make a gun shoot: You'll need to add a script to the gun. There are many potential ways to make a gun shoot, but I suggest either looking in the script reference for Instantiate (to create projectiles) or looking into Shuriken to create particles.

-How to make a gun 'have kick': Again, multiple possibilities. You can do it with scripting (either physically or not), or do it with an animation. Please see the Unity reference for animations - there's a lot there.

-How to add AI: AI is a huge topic. There is no one way to add AI. AI will require scripting, and there are numerous forum posts discussing ways of implementing AI, depending on what you're trying to do. There are also plenty of packages in the asset store.

I highly suggest that you run through one of the Unity tutorials to get a feel for how to create games with Unity.