Jump to content

Ped/bot spawning


Joe_

Recommended Posts

Hi guys,

I've came across a problem with bots that I cannot find a way around with my limited LUA knowledge.

I am spawning X number of peds/bots around a player and then making them attack/hunt the player they spawned within radius of, but the problem is, some peds will get stuck in objects such as trees and sharp hills. Is there any way to detect when this happens and fix it? I've looked over the wiki and can't see any function that could help, but as I said, I only have limited knowledge of LUA.

Thanks in advance.

Link to comment

Im not sure of all the MTA functions but i suppose this is probably the noob way around it, create markers where the peds are spawning that you dont want them too and if the ped is in the marker then destroyElement(pedvariable) or maybe you should use a col shape. I don‘t know if this is the best option but it can work. Another way would be to create an edf for the spawn points of the peds then they will only spawn in places you choose, Take a look at the zombie resource by slothman if your not sure.

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