Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Kazaskater · Feb 09, 2011 at 06:22 PM · aienemyshooterpersonfirst

How To Make Basic AI?

Okay, so I have a first person shooter set up, with a map and a character, with animations, grenades, multiple guns, etc. I am NOT using the MachineGun.js script unity includes in there FPS tutorial. I wrote the whole script from scratch myself. I am using a lot of the assets from the bootcamp demo, and I want the enemies to be the soldier you play. I have the model setup, and I have all the animations. All I want to do now is have him stand there (or possibly patrol a path), and when you get within a certain distance from him, he will maybe run and hide, then a few seconds pop out and start shooting, or something. The games pretty much finished except for enemies. you can pick up ammo, and there are plane crashes and stuff like that, so I want it to look good. Possibly, could someone explain how to use Behave (and exactly how it works), because I can't find any good tutorials. (Also, I already have it installed and ready to go. Its version 1.12 I think)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by PrimeDerektive · Feb 09, 2011 at 07:09 PM

As far as I know, Behave is just a drag and drop solution to easily create finite state machine structures, but you still have to code by hand the actual behaviors that are supposed to occur in each state.

I would dissect the AI scripts from the various tutorials from the resources section of Unity3d.com, both the 3rd person platformer and the FPS tutorials have basic AI behaviors that can get you started with a basic patrol/chase/attack bot.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by Zeyad Tuffaha · Feb 10, 2011 at 11:37 AM

As mentioned above, you can use the scripts from the Unity FPS tutorial. I have created a FPS game and used the scripts on my AI and it's great.

The scripts are "AI (which automatically assigned a character controller), AIanimation (which allows the AI to animate) and you can also assign a damage receiver or something. It's all there in the tutorial, all you have to do is drag and drop.

It also has a waypoint finder, you only move the waypoints around and the AI will follow automatically.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kazaskater · Feb 10, 2011 at 07:05 PM 0
Share

The problem is, is that the scripts are just much too different. It would require me to basically break down their entire script and pretty much redo it. I guess I will just look at theirs and make a new script from scratch, using some of their code.

avatar image
0

Answer by Stib · Feb 09, 2011 at 08:49 PM

If you want to learn how to make a great game AI, read Programming Game AI by Example. The book is geared toward creating First Person Shooter behavior.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DeveshPandey · Mar 26, 2018 at 05:09 PM 0
Share

Here is a good plugin, it may help you.

https://www.assetstore.unity3d.com/#!/content/87744?aid=1101l34jr

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

How do I make my fps character grab objects? 4 Answers

Monster doesn't move 0 Answers

Mecanim Fps Shooter? 3 Answers

shooter adjust where fired 0 Answers

First Person Shooter Prefab not working 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges