mikethemadkiwi / busdrivermike

A bus driver Mod for FiveM
Creative Commons Zero v1.0 Universal
13 stars 3 forks source link

question /implementation #4

Open evert-hoos opened 1 year ago

evert-hoos commented 1 year ago

Hi mike again! :)

i have been using your bus script for quite some time and the AI .. is just terrible and i feel that the bus + driver should not despawn , just drive a route like in real life

i have been looking around amongst other scripts , and poking around youtube for bus routes... however every bus script the AI remains terrible ( yours is the least buggy so far )

is it possible to expand your script with own coords ? so that the AI will actually use that route and not despawn ? ( i have seen script that made use of the path.xml and the coords on that ) infact i have made a small blip script which resembles those coords

image

(not all blips fit ofcourse)

mikethemadkiwi commented 1 year ago

To be honest, yes, BUT.... the way you'd want to do it would require a slightly different way of doing this than mine. having said that, MY AI is simply the ped behaviour, and not calling his task EVERY tick. ( he becomes less and less buggy the fewer times per second you tell him to do things. ) the biggest issue you'd face is that at LEAST one player would require being on to handle the ped task requests. this is still to this day the biggest annoyance with these types of scripts is client<>client host migration of net objects. vehicles and peds, without a player to have the AI run the logic on, just dont do what they're expected to.

you could use the following from my scripts for your needs

evert-hoos commented 1 year ago

thnx for your quick reply :D

hmm i was thinking .. let this be an empty bus without a driver , which has lanes and stops , the route would be good the stops , a little akward but .. lets say the AI kicks in when enter/exits the bus ? eg a vector3 which enables/disables the driver, but remains static

like so : coord x.y.z (legionsquare approach) AI enable wait 20 secs (people approach, enter) ( door closes AI kicks in until) coord x.y.z resume route

... i will see what i can adjust in your code and make it , less dynamic , but doable :D

mikethemadkiwi commented 1 year ago

i considered writing something that emulated actual bus behaviour. but gave up after i realized i'd be writing custom handling for fugging every situation that wasnt related to "task go to coords" Good Luck!

feel free to add me on discord or twitter or something. if you have any problems i'm MORE than happy to share whatever knowledge you might glean from my previous attempts.

I work 14 hour days these days, so i'm not around much but i'll reply when i can.

mikethemadkiwi commented 1 year ago

I have made a couple changes to the existing AI. lowered calls to the AI. it SEEMS better, but it may be less able to stay focused in situations like gunfire. not really a fix to your request, but something i had been meaning to try for a while that SEEMS better in terms of PED task behaviour.

evert-hoos commented 1 year ago

hi mike , i will check tonight :)