Jump to content
Steve Winters

Civilian Car Driving

Recommended Posts

Hi,

I've been wondering if there is anything you can do to make civilian cars to pull over to the side of the road when a responding emergency vehicle with lights and sirens are on. It's very annoying when cars stop in the middle of the street, intersection or highway and then the fire truck, police car or Ambulance fail. Especially the tow trucks. Even though they don't have sirens, they do have lights. However. I don't expect cars to pull over to the side of the road for the tow truck. At least is there a way to make the tow truck drive smarter? I'd appreciate any help, suggestions or pointers.

Thanks,

Steve.

Link to comment
Share on other sites

This would be a game issue as far as the pathfinding goes, we can't really smarten up the driving skills of the AI there unfortunately. In the end they are more or less driving school rejects=(

The idea of making them pull over might work, but in the end it would also probrably pose bugs which would result in the civie traffic having their own pathing issues if for example they pulled over onto/near a telephone pole or a parked car or such they will just "stop" and stay there permanently.

Link to comment
Share on other sites

This would be a game issue as far as the pathfinding goes, we can't really smarten up the driving skills of the AI there unfortunately. In the end they are more or less driving school rejects=(

The idea of making them pull over might work, but in the end it would also probrably pose bugs which would result in the civie traffic having their own pathing issues if for example they pulled over onto/near a telephone pole or a parked car or such they will just "stop" and stay there permanently.

Yeah, Thats what I thought it was. A game issue.

How would it be possible? I'll attempt to make it work in a future modification I have planned to make with Hoppah's permission. It would be something good to have. only problem would be the bugs. Where cars would get stuck in poles, trees, buildings maybe, and parked cars. Maybe there is a way to fix that. But who knows until I, or anyone else, gives it a shot.

Link to comment
Share on other sites

From my experience IF there is any collision data object along the path where the vehicle would pull over you will end up with it running into it if it is "forced" into that direction, the AI is not smart enough to stop and think until it is too late, once they get close to it, they try to think for about 3 seconds, then the car's lights go out and it parks there permanently. The scripting end is out of my "realm" so maybe a scripter can help describe how it could potentially work, but in the end from my experience with a misplaced path before I can tell you that it will likely result in a parking lot of parked cars that will not move ever again if there is anything with collision data where they are running.

Link to comment
Share on other sites

Yeah, realism seems to be a major problem when it comes to vehicles actions to emergency vehicles as well as the vehicles themselves. Now, I think one issue you might run into is when the vehicle pulls over, those turning will too, and that might cause traffic jams right there. Maybe the ideal thing to do would be to increase the distance as which they stop for police to maybe 3 total car lengths ahead? That way is leaves part of the oncoming lane open for the police to bypass and oncoming cars should be stopped as well.

Link to comment
Share on other sites

Guest dkmaisto

The problem with this games road system is that it is made out of paths, that means predetermined lines that the vehicles more or less have to stick to.

If the designers of the game were to make any changes to the way mapping out roads would be to change to defining the roads as being a column the the vehicles were to move about freely in, that would lead to some major changes as what is possible regarding traffic, it would also take an almost complete overhaul of the entire game, so I won't be done to Emergency 4.

I hope you guys understand what I am saying, I've tired to make it as easy to understand.

Link to comment
Share on other sites

The problem is how paths work it is not like each path is a "lane" it is in fact both sides of the road, the game was designed in a way that generally speaking most the roads were assumed to be two-lanes only, traffic on either side. Due to this it makes it extremely difficult to make pathing that would flow as a normal street would for example, especially on roads with multiple lanes.

Link to comment
Share on other sites

The problem with this games road system is that it is made out of paths, that means predetermined lines that the vehicles more or less have to stick to.

If the designers of the game were to make any changes to the way mapping out roads would be to change to defining the roads as being a column the the vehicles were to move about freely in, that would lead to some major changes as what is possible regarding traffic, it would also take an almost complete overhaul of the entire game, so I won't be done to Emergency 4.

I hope you guys understand what I am saying, I've tired to make it as easy to understand.

Yea, I totally understand what you mean. I wonder if they could do it for EM5 if that is ever coming out, which I believe it will be (I'll email the creators). It would be amazing if they could alter this and make it some how. To set a command for cars to move over if they hear sirens behind them or something like that. I dunno. I wouldn't be able to do that at all.

The problem is how paths work it is not like each path is a "lane" it is in fact both sides of the road, the game was designed in a way that generally speaking most the roads were assumed to be two-lanes only, traffic on either side. Due to this it makes it extremely difficult to make pathing that would flow as a normal street would for example, especially on roads with multiple lanes.

I see were you are going. It's not like they can freely drive. They are set to lanes. Would it be possible to create a submod or something that would make the Fire Trucks, police cars or ambulances a bit smarter and over take a lil bit further behind a civilian vehicle?

Link to comment
Share on other sites

This has reminded me...

In the coastal rescue mod the guy edited the emergency vehicles to follow a different path, basically right down the middle of the road.

The civi cars never stoppped moving, and the emergency vehicles just drove straight through the middle of the road, it worked on roundabouts he had created as well.

Might be worth you getting in touch with the mod creator and see if he's happy to pass the info along?

If you search through his thread I believe there was a video at some point showing it in-game.

----------

(Apologies for the advertising of a mod, however I feel it's justified here)

[Edit]

Youtube link can be found on this page HERE

Link to comment
Share on other sites

This has reminded me...

In the coastal rescue mod the guy edited the emergency vehicles to follow a different path, basically right down the middle of the road.

The civi cars never stoppped moving, and the emergency vehicles just drove straight through the middle of the road, it worked on roundabouts he had created as well.

Might be worth you getting in touch with the mod creator and see if he's happy to pass the info along?

If you search through his thread I believe there was a video at some point showing it in-game.

----------

(Apologies for the advertising of a mod, however I feel it's justified here)

[Edit]

Youtube link can be found on this page HERE

Really? From the Coastal Rescue mod? I'll check it out. I'd be happy to have something like that. That's really clever. I wouldn't mind knowing how he did that.

Thanks for the information!

Link to comment
Share on other sites

Isn't this just a matter of where you put "Roads" in the editor? Don't the emergency vehicles by default follow the "road" paths so if you lined it up on the center line and not center of the line wouldn't that be the same thing?

I'd much rather have a farther distance as to which vehicles notice emergency vehicles and stop sooner.

Link to comment
Share on other sites

Yes, Thats what I believe. It seems pretty easy but I'd ask him first.

Maybe. The Emergency Vehicles do have a default path. By moving that path to the center of the road you could possibly make them driving in the center of the road.

It's weird. When cars stop. The Emergency Vehicles stop behind them and then start reversing or doing 3 point turns. Which causes a lot of confusion and then they get stuck. With them driving in the center of the road its easier for them to get to the destination faster then instead of driving in the lanes and getting caught up behind them.

Link to comment
Share on other sites

Guest pmadden94

From my experience IF there is any collision data object along the path where the vehicle would pull over you will end up with it running into it if it is "forced" into that direction, the AI is not smart enough to stop and think until it is too late, once they get close to it, they try to think for about 3 seconds, then the car's lights go out and it parks there permanently. The scripting end is out of my "realm" so maybe a scripter can help describe how it could potentially work, but in the end from my experience with a misplaced path before I can tell you that it will likely result in a parking lot of parked cars that will not move ever again if there is anything with collision data where they are running.

Hmm...I have not dealt with this kind of scripting in a while..here's my thoughts;

1- There might be a way to add to the script..once it reaches the stopping point, or object, the script would make the car back up, and retry formulating a path

2- I also think that the AI is somewhat intelligent..for example; if for whatever reason the car goes off path, the car soons finds a route back to the path...

3- if the above is true, then all we need to figure out is how to make the cars pull over when there is an emergency vehicle near..

4- IF all else fails; THIS IS MY INGENIOUS PLAN; You know how the police car actually creates a "invisible" cop behind the car when directionals are turned on? What if you were to put that invisible cop, lets say, ten feet in front of the police car, and make it so he redirects traffic in front of the car...sounds crazy, but may work..

I do see some problems...if the cars pull over when there are sirens..wont they also pull over when the emergency vehicle is sitting still at an emergency? Then, if there was a fire for example, the car would just sit there, pulled over, and blow up....

Link to comment
Share on other sites

Was it Hoppah ( or could have been another one of the big guys ) say in regards to driving with the invisible cop was not possible since he can't follow... So would a script be able to keep moving him a few feet forward? And really all you'd have to do is change him to a stop and have traffic stop and not redirect... I think redirect would just cause a multitude of traffic jams more so on busy roads.

Link to comment
Share on other sites

If you watch the redirect script the vehicle hesitates before making the turnaround, so in the end he would probrably slow you up more waiting on him to make the choice on his path before your emergency vehicle can commit to yours, especially if he is bumper-to-bumper with the vehicle in front of his, your truck would become the "path blocker" when it closed in. Add in the potential pitfalls when requested in the middle of an intersection, 4 lane roads, OR when the vehicle was angled on whether or not it would re-direct the proper vehicle.. It is worth a shot should a scripter desire to try to do it, however the redirect script will cause the cars to turn around instead of pull over. For the time it takes (depending on traffic density) for the path to clear I think in the end you will find your emergency vehicle did a better job of getting by on it's own.

As for the AI finding a path, generally it does ok at this, however if it is on a "corrupted" path that forces it to engage something solid, it will run into it rather than realize it is there... by the time it figures out it's a physical object it's already too close to formulate a way off of it, thus you end up with the parked abandoned car syndrome where it turns off and just rots there... During testing of the new freeplay map I caused this mistake with a telephone pole and every single car that came down that road did the exact same thing one by one by one into one another's rear ends till they were all stopped. Although I must say did a terrific job parallel parking on the curb.

Goodluck to whomever thinks they can crack this one, if you can find a way to script it so they don't have to waste the time thinking about a new path, it might work.

Link to comment
Share on other sites

Thats what I had in mind. If they are to turn around it seems that they will jam up and get stuck and caught and then its just a massive cluster of cars. Causing problems and making the emergency vehicle delayed. There are so many options here. I personally like the idea of emergency vehicle driving in the center of the road. Like in the Coastal Rescue Mod. (here's a vid if you haven't seen it

) It's rather clever. Something that could be put into the next la mod version if the Creator of Coastal Mod gives Hoppah permission?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...