Jump to content

How to add bot's in race


MetaGamer

Recommended Posts

In SA-MP there's no function to simulate keypresses at all. And you can only make the bot drive by changing velocity of car or recording the actions and playing them back. That is possible in MTA too, but if you want them to actually drive, you need to simulate keypresses (what you can't do in SA-MP). Actually, it may be hard to make the bot drive properly, but making it simply follow the route isn't that difficult.

Link to comment

On the thing with SAMP bots:

They just drive a patch predriven by you. They have no ability to follow you and just drive their prerecorded thing.

I guess this is done by just saving the positions periodically at recording and later on having the bot drive from one point to the next, which is still quite easy to do.

To actually make a dynamically driving and following bot, you would have to do something like this:

Program the AI to find the (best) route to you, around obstacles, react to situations like when they hit a wall or when their car is upside down or when another player hinders them (rams them). And that's not all to it.

To accomplish all that needs a LOT of work, skill and plain old time. It's something, which is out of reach for 99% of the people visiting this forum, and the rest is not willing to put so much effort in a still very basic AI, I would guess.

I hope you now understand, why we can't help you with this. And since you seem to be very new to scripting, this is just nothing in your reach right now.

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...