x


Couple of questions regarding AI scripts and animation?

Im a beginner to unity3d, and dont have much knowledge about animation or scripting.I have a couple of questions to ask regarding scripting and animations.

1.Could anyone provide/teach me a script to make an enemy follow the target and attacking it with melee, as im working on a game, with enemies that have drills attached o it, so damage will be inflicted as the player comes in contact with it.

2.I needed a script that can make an animation start while I hold a button, and when I release it, the animation stops, and a new animation plays. I've been working on this a whole day, and cant seem to find a suitable script for it.

Any help would be appreciated, thanks alot!

more ▼

asked Jun 16 '10 at 02:52 AM

user-3061 (yahoo) gravatar image

user-3061 (yahoo)
126 29 29 37

That stuff you can find in the many wonderful unity tutorials in the resources page. Take a look at the FPS tutorial and the 3D platformer one, they should answer all your questions.

Jun 16 '10 at 03:02 AM spinaljack

In general, it's usually a good idea to post separate questions as separate questions instead of combining them into one bigger question. So this would ideally be one question on the AI scripts, and another one on the animations. That'll likely get you specific answers quicker.

Jun 16 '10 at 05:15 AM jashan

I agree. If you take a look at the Unity's 3D Platform tutorial and the FPS tutorial you will get introduced to AI concepts and will be able to take those AI scripts as a base for your own game. Unity3D is one of those rare tools with a huge community and a lot of documentation and tutorials. Go ahead and take advantage of them !!!

Jun 29 '10 at 10:47 PM Arbbot
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

AI is "pretty advanced stuff", so when you don't have much knowledge with scripting and animation, it would probably be a good idea to start getting a good feeling for scripting and once you feel comfortable with basic scripting, move on to the more advanced stuff (like AI and scripting animations). Doing it the other way round (doing the advanced stuff first) will likely just result in frustration.

To start with scripting, you might follow the advice in this question. There's a few basic programming tutorials linked there, so that should get you started.

Once you're got those scripting basics covered, you'll find the tutorials that spinaljack mentioned and a few more here. I'm not sure how easy it would be to go through those tutorials with little programming knowledge, as those are not really programming tutorials. So in any case I'd still recommend doing pure programming tutorials first and those tutorials second.

more ▼

answered Jun 16 '10 at 05:12 AM

jashan gravatar image

jashan
10.1k 25 40 116

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3807
x3340
x960

asked: Jun 16 '10 at 02:52 AM

Seen: 2127 times

Last Updated: Jun 16 '10 at 02:52 AM