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 /
This question was closed Apr 14, 2013 at 07:43 AM by Fattie for the following reason:

Duplicate Question

This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by DeadKenny · Apr 14, 2013 at 07:19 AM · c#ai

AI control C#

Hello.

I have this APC with fully working suspension, realistic physics and a turret which shoots.

So How would I get the AI to use this code? Do I have to make whole new code or is there a way to get the player input to be faked? Or is there a way for the AI using another script to override the player input in the APC control script(or a clone of the AI control script)?

Do you understand? I hope I am clear enough. Please help if you can.

Much thanks.

Comment
Add comment · Show 1
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 Fattie · Apr 14, 2013 at 07:43 AM 0
Share

If you want a free script: search and google for 100s of scripts. Even ON THIS SITE you will find a vast number

If you want to purchase an AI script. Open Unity. Using the menu bar (top of your computer -- right near wher the screen ends -- select "Asset Store"

Using PayPal buy a script. $$anonymous$$any are available.

if you want to generally discuss AI, use the forum site (or better, stackoverflow etc)

All of your questions answer "yes". It's completely possible to either (a) change the script or (b) modify the script slightly or (c) have another script change variables in the first script. These are extremely general program$$anonymous$$g questions. All approaches are perfectly valid. It is irrelevant to the issue at hand "how to do car AI"

1 Reply

  • Sort: 
avatar image
0

Answer by Chronos-L · Apr 14, 2013 at 07:42 AM

I would suggest writing another script. To make a AI use a APC is more than just faking player input, you need to teach the AI on decision making (the human player did it in their mind).

So you should write another script that has decision making capability (which path the AI should use, which target to shoot at etc) and the ability to control the APC ( basic acceleration, turning, aiming, you can copy the code from your player-control if possible )

Furthermore, depending on your game design, it is possible that your AI will form a team and make team strategy; or you can design a basic AI to control the APC, but you write another much more complex decision-making AI, it will act as the commander and it will send in command to all the AI in the scene.

This all goes beyond than just faking user input.

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

Follow this Question

Answers Answers and Comments

13 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

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

How can I more optimize My AI Script 0 Answers

Basic 2d AI follow? 1 Answer

A* pathfinding for 2D top Down 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