20.04.2016, 15:45
Quote:
Sometimes there are some nodes that when parking a vehicle as a taxi or police car are "bugged" or what? Look at this image.
There are routes that vehicles arrive to collide. Look at this second image. And another question, can you make a choice to disable or enable the parking of vehicles in the script? |
And did you download the newest GPS.dat from my GitHub? With that version there are actually no paths to get stuck anymore. However some end-nodes are badly chosen (I will rework some of them).
About vehicle collision, I could do something about that but that would make the script even more ressource intense, they now ignore every other NPC that is not facing the (almost) same direction, which makes it quite efficient. Removing that will make a quite complex loop at every node point
I'll add a define for parking later. But imo this is way better than having vehicles 180-turn in the middle of the street (which is not possible to fix except editing the GPS Plugin to start calculations in a defined direction - it's discontinued by Gamer_Z).
Quote:
Originally Posted by kaisersouse
Oh thanks for the tip! yeah its defintely a work in progress still. This morning I copied some of the drivers_init stuff but didnt have much time to test. On test server now the driver AND the car end up at 0,0,0 hovering...but once you shoot at them they drop to the ground and attack etc. I'll play more with it later tonight.
|
When they should get back to the car, check if the vehicle has respawned (Drivers[id][nVehicle] is the vehicle ID). If yes, put the car next to them, else they will be doing unpredictable stuff.
If they re-entered call "pubCalculatePath" (using a timer, copy from somewhere else) and they should continue as normal. WhenRouteIsCalculated resets all important variables (including state) for you. If theyre back in a vehicle and no other part of the script is accessing the NPC it should work well.
However you can also wait for me to add it, not like you couldn't, but I guess there are quite a lot of things to take into account. I have a quite good system in my head already how to make it efficient and nice. For example letting them drive off the road a bit when exiting.