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 garrett 4 · Mar 30, 2011 at 03:03 PM · androidgamecar

How do I add bots in android?

Im making a racing game for android, and im trying to add more cars that will be your opponents. If anyone could give me the script for it, or explain to me how it is done, I would be willing to pay a $40 reward, if i can get it to work.

Thanks!

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Meltdown · Mar 30, 2011 at 03:13 PM

I'd suggest taking a look at this tutorial

Paying special attention to Step 5 where AI is explained. Although for your benefit I'd suggest doing the tutorial from scratch.

Within the downloadable project is the complete AI script which uses waypoints to make the AI cars go around the tracks.

With regard to offering money for work/solutions, the correct place to post that is in the Unity Forums under the Commerce section.

http://forum.unity3d.com/forums/31-Commercial-Work

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 Justin Warner · Mar 30, 2011 at 03:16 PM

Lol, money might make some people post =P.

For racing...

Have nodes on the map... These nodes are just path ways. And each set have their own tag... so like, set 1 set 2, 3, 4, etc...

So, you have the racer start at 0, (Start...), then you have a script....

If the time is 0 (Go time... going to assume it'll be like, 3-2-1 GO), if time is 0, find new target, each racer finds next tag... so the tag would be followed as... "i", so, you i++, get the next tag, it adds all those tags (Use a for:each), so, it adds those in to the array (You can use a List), so now, it random number's, and grabs that number of the array/List, and it goes to that one... And so on until it's done... And when target is reached, it goes for the next one... if that makes sense...

=) Hope this sparks an idea in the least... And don't worry about the money... Go and buy your girlfriend/wife dinner and tip the waiter/waitress the rest for me =).

Comment
Add comment · Show 3 · 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 Meltdown · Mar 30, 2011 at 03:18 PM 0
Share

lol maybe yeah :p

avatar image Justin Warner · Mar 30, 2011 at 03:42 PM 0
Share

Lol, I don't like giving people all the code for their problems, always thought they should work for it at the least... But meh, whatever =P. Your way works too =P, lol.

avatar image FLASHDENMARK · Mar 30, 2011 at 03:45 PM 0
Share

1+ for the generosity(I think that is the right word) :)

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

No one has followed this question yet.

Related Questions

Car Selectin Script 1 Answer

Level Button And Quit Button Android 2 Answers

Problem with jcar script for android mobile 1 Answer

How to make android see game as game 1 Answer

do visual coding support android game 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