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 $$anonymous$$ · Dec 06, 2013 at 11:33 PM · enemy

Enemy AI help

Hi guys, just wanted to say before I start that Im sorry if this is a rather large request, Im an 'artist' (air quotes) and so I cant really do coding, but Im slowly trying to learn around my current stuff going on. Also, if you cant help me yourself, a link to an asset store thing that can do what I want without coding is absolutely fine...

Okay, so now we got that out the way, Im trying to create some enemy AI and Im having a lot of trouble, I was wondering if you guys knew any, or even if your feeling generous write me, or find me an asset store link to, an AI script. Its somewhat basic, so at least thats something.

Okay, so I need it to patrol randomly in a formation (I guess this could be done by grouping units in an empty gameobject and keeping them in the order I placed them in originally, but what do I know). By randomly, I mean without waypoints, so they just walk around the map at random. But when they come close enough to one of 2 types of enemies (So I want them to attack the player, but also another army, so they need to attack both), which one they attack I dont mind whether its random or whose closest, I gotta give you some leeway. Because of the attack, it needs to have a basic health and shooting system, where each one unit fires 1 shot every 10 seconds ish (its supposed to be very slow, its a musket), and if even better if they run into the enemy and melee attack if within a certain range. It doesnt need any animation system or anything, just what I said above. So far, I just have a third person controller for the player, so if it needs a corresponding script to work with the player for health and being shot, just have that as a basic health system and so it shoots every 10 seconds when clicked.

Sorry for the high demands, as I said Im lost when it comes to coding but I want to make this game, and I'd rather do it alone (being in a team forces you into a certain commitment, and I dont have the time or the confidence in my own skill for that at the moment).

Thanks so much for any input

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Wiki

Answer by Raiden-Freeman · Dec 07, 2013 at 12:40 AM

Don't be scared of programming. It's easy. You just need to really divide your goal into much much smaller ones and achieve them one by one.

If you're looking for some tips on AI in C#:

http://youtu.be/O8-oZfi4utY

http://youtu.be/pqDtPKLgbBE

And in UnityScript: (quite explanatory) http://youtu.be/i3HunQfX5fA http://youtu.be/KD0kLCZNQlc http://youtu.be/ooRajiKbOIU

And this guy who has the scripts ready to download: http://youtu.be/FMyVTXs1g94 http://www.youtube.com/watch?v=NFrkbe6Ltd4 http://www.youtube.com/watch?v=jj4zolt3Auk

I recommend that you familiarize yourself with C# and not UnityScript, because even though it may seem tougher for you at the beginning (go to MSDN for ANYTHING you don't understand, there are also insane resources explaining EVERY term, google ahead :) ), it will prevent you from making mistakes, help you create much much more organized code, which will be easier to manage the larger it gets. Plus you're learning something not only applicable to Unity!

Good Luck!

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 $$anonymous$$ · Dec 07, 2013 at 01:14 AM 0
Share

Oh I am learning program$$anonymous$$g, I just dont have much time to do that alongside all my other stuff, and the project I need this script for is just a little game jam thing Im doing :) Thanks for the help though

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

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Enemy AI Help? 1 Answer

How to Stop Enemy "Shooting Through A Wall" 1 Answer

Enemy Spawn script not continuing level 2 Answers

Script to make an enemy follow the player when they trigger a door? 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