Jump to content

How to add bot's in race


MetaGamer

Recommended Posts

It's not as easy as you might think, actually it's quite hard.

If you just want a bot, which runs around with no clue, follows you or just stands still, then that's no problem.

But to write a bot AI, which races you on a track, is way harder.

So I'd advise you to refrain from this idea and start off with something easier ;)

Link to comment
There was some resources that let's you film when you are driving and then you can make a bot do what you did, check mta community.

But then the bot will always drive in the same way and the car won't have physics. For example you won't be able to affect it by hitting it with your car.

To make a driving bot:

1. Create a car and store it to a variable.

2. Create a ped and store it to a variable too.

3. Use warpPedIntoVehicle to put a ped into the car.

4. Use setPedControlState to make him drive. That's where you need to write the AI yourself.

Link to comment

Look, check wiki. You are asking too many things, and you just started on MTA. And this kind of script is very hard, even for experienced scripters (of course not impossible).

My suggestion: learn LUA a lot, check wiki for help instead of ask everything because there are own jobs/projects on every scripter, and when you get stuck, check the syntax with Notepad++ or something like that, if the problem isn't the syntax then ask here. And maybe, in 1 year, you would have learned enough to do this script.

Link to comment

Is it so hard to understand that it's not that easy?

No one will be willing to do that for you just now, since it's something really hard and needs a lot of work. Even very good programmers need quite some time and effort to program such an AI.

So just accept, that it's out of your range right now. Try to find an easier task to do, but don't start off with "programming an AI", since that's one of the most difficult parts of game world programming.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...