Blocking traffic with emergency vehicle
-
Hey guys!
I'm kind of new to modding and i really think i got this but there is one little problem i run in to.
I created an ambulance that replaces the original one. Everything works fine. Lights, sirens, etc. (ELS)
Traffic stops at intersections and moves aside like it should.
As soon as i block a lane and get out of the car, traffic starts moving again, ignoring lights and sirens, ramming in to the ambulance.
Anyway, i want to block traffic with the ambulance (and my flatbed and firetruck) just like the police cars do, but don't know where to look.
Is there anyone who can point me in the right direction?Thanks in advance!
-
To be fair, I've never noticed GTA peds/drivers giving any courtesy to the AI emergency services either.
-
Well, i didnt noticed that either. But when im controlling a police vehicle, block a lane and get out of the car, drivers are being good citizens and wait patiently behind the police car. If im using the ambulance and get out, citizens become impatient and start driving around the ambulance, sometimes ramming it.
-
You are correct @ShaggyG60. Other drivers DO give way to police and ambulance vehicles and I also didn't notice any impatience-induced rage even if I block a traffic for minutes while in emergency vehicle.
My guess is that you probably missed some chunk of information that "immunizes" your vehicle from road rage attempts. Unfortunately, I don't have enough knowledge to tell what it might be.
-
@ShaggyG60
Haven't tested any of this but here's a few ideas:Try adding these flags in your Ambulance's 'vehicles.meta' '<flags>' line (if they don't exist already):
FLAG_BIG (afaik this stops the cops ramming you when you have a wanted level. Maybe peds respect it too)
FLAG_IS_BULKY (might be similar to above, not sure)FLAG_LAW_ENFORCEMENT (hopefully these two make them respect you properly)
FLAG_EMERGENCY_SERVICEAfter that make sure the vehicle class in 'vehicles.meta' is set to 'VC_EMERGENCY'
<vehicleClass>VC_EMERGENCY</vehicleClass>
Best of luck. Let me know if any of it works
-
Thanks for the reply's. I will try and report back!
-
@a63nt-5m1th Only had VC_EMERGENCY to add, did not help...
-
@ShaggyG60
Can you replace your modded ambulance with the original vanilla one (& it's vanilla files) & then do the peds return to respecting you or is it still the same?
My Ambulance is 100% vanilla, I'm going to have a play about with it & see what peds do when I block the road etc
-
@ShaggyG60
With vanilla settings the peds do indeed push past Ambulances while on the other hand they totally respect Police vehicles (although some nugget peds do occasionally bump into Police vehicles they don't barge/drive past even if there is space).
When I added the:<flags>FLAG_LAW_ENFORCEMENT</flags>
to the Ambulance they respected the vehicle just like they do for the Police vehicles.
One thing I did notice is that for this to work you HAVE TO leave the emergency lights flashing when you leave the vehicle. If you switch them off the peds will just start barging past.
I copied the flags line from the Policet & it worked:<flags>FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_NO_RESPRAY FLAG_DONT_SPAWN_IN_CARGEN FLAG_REPORT_CRIME_IF_STANDING_ON</flags>
& then I merged it with the vanilla Ambulance flags line (removing duplicates) & it worked also:
<flags>FLAG_LAW_ENFORCEMENT FLAG_BIG FLAG_NO_BOOT FLAG_AVOID_TURNS FLAG_HAS_LIVERY FLAG_PEDS_CAN_STAND_ON_TOP FLAG_EMERGENCY_SERVICE FLAG_NO_RESPRAY FLAG_DONT_SPAWN_IN_CARGEN FLAG_BLOCK_FROM_ATTRACTOR_SCENARIO</flags>
I investigated possible conflicts between different flags & am confident that 'FLAG_LAW_ENFORCEMENT' & leaving the flashing emergency lights on is all that should be required to get the peds to fall in line.
If I was you I would confirm the vanilla Ambulance works as intended/outlined above & then depending on the results of that, maybe look into possible conflicts/trainer settings etc (I have 'leave engine running' set to ON in my trainer but I switched it OFF & the results were the same). Check for any aggressive ped settings too & remove any mods that mess with how peds act & might make drivers more agro.
Maybe check 'relationships.dat' & try forcing 'CIVMALE' 'CIVFEMALE' etc to 'Respect MEDIC FIREMAN COP' (I don't have that set but you might be looking at having to find a workaround somewhere & although I'm not exactly sure how these settings affect ped behaviour, or if it even affects drivers, it looks like a good place to start).Hope you get it sorted bud & if I think of anything else I'll give you a shout
-
@a63nt-5m1th Woah...thx for taking this to a whole other level! I've been kinda busy lately with keeping our server up and running with all these updates and stuff that breaks for no reason, so im kind of behind with all the projects i'm working on. I'll try and move this up on my to-do list and resume this ASAP.
-
@ShaggyG60
No probs