Jump to content
draoth

Agressive civilian vehicle behaviour

Recommended Posts

Hello everyone,

I'm creating a mission where there are alot of AI driving around with waypoints and when the civilian driver comes across my walking OPFOR player he always tries to hit them with their vehicle. Is this because of the current waypointbehaviour: "Aware" , or because of the relation between Civilian and Opfor, or is it just the pathfinding?  

 

Draoth

Share this post


Link to post
Share on other sites

its just the pathfinding i think, AI driving is murderous. It does often look like they are intentionally swerving into people, in fact i think they're just epicly failing to move round them.

 

for example i've noticed if i get out of a vehicle driven by my AI group the driver will enthusiastically try to keep formation, which usually means running me over. :(

 

theres an AI driving script in the VCOM ai package that works a lot better than vanilla driving, and there was a script on armaholic which removed damage caused by vehicle ramming.

Share this post


Link to post
Share on other sites
39 minutes ago, lordfrith said:

its just the pathfinding i think, AI driving is murderous. It does often look like they are intentionally swerving into people, in fact i think they're just epicly failing to move round them.

 

for example i've noticed if i get out of a vehicle driven by my AI group the driver will enthusiastically try to keep formation, which usually means running me over. :(

 

theres an AI driving script in the VCOM ai package that works a lot better than vanilla driving, and there was a script on armaholic which removed damage caused by vehicle ramming.

Thanks, do you have links for those scrips you named?

Share this post


Link to post
Share on other sites
17 minutes ago, lordfrith said:

vcomAI driving is script or mod. may not work in non-vanilla maps, have a read through the thread before you try it.

 

rydygier's liability insurance is only mod i think, not script. Also quite old now, again worth checking forum page

 

 

Oh that's a bummer, do you perhaps know a way to disable vehicle ramming damage with a script? Or do you have any idea what i should look for?

Share this post


Link to post
Share on other sites

actually i think this kinda works. good ole event handlers

 

got the idea from this thread

 

Quote

this addEventHandler  
[
        "handleDamage",
        {
        private["_unit","_damage","_source","_projectile","_part"];
        _unit = _this select 0;
        _part = _this select 1;
        _damage = _this select 2;
        _source = _this select 3;
        _projectile = _this select 4;
 
        if(vehicle _source isKindOf "Car") then {
                if(side _source == civilian) then {
                        _damage = 0.001
                        }
                }
        }
];

 

pasted this into a few unit inits in editor then started mission as civilian in car and went on merry rampage. nobody died! Its a start, the conditions could maybe use a little work and if you're needing it on spawned units it'll have to be added.

Edited by lordfrith
make it pretty

Share this post


Link to post
Share on other sites

You can actually see rydygier's scripts on the BIS forum page, which is linked near bottom of the Armaholic page posted earlier. He used handle damage as well, although I think lordfrith may have the better idea with isKindOf "Car".

 

I never thought of trying to mitigate damage from being run over. I've complained about it in the past because I spawn AI drivers in my missions. I had one case where I hid behind a bus stop, and the freaking AI smashed through the bus stop to crush me. In a recent mission where I was riding along with an AI driver, he actually went off road to drive around a pedestrian that was not even on the road. BI needs to tighten up their drivers scanning a bit.

Share this post


Link to post
Share on other sites

@AZCoder yeah those AI drivers seem to have a real grudge against pedestrians! The rydygier source on BI forums is really cool (reading icognito source :D) but depending on whats needed for mission this might be all thats required. it seems like a suspiciously simple solution, i'm still sure i must have missed something ;)

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, AZCoder said:

You can actually see rydygier's scripts on the BIS forum page, which is linked near bottom of the Armaholic page posted earlier. He used handle damage as well, although I think lordfrith may have the better idea with isKindOf "Car".

 

I never thought of trying to mitigate damage from being run over. I've complained about it in the past because I spawn AI drivers in my missions. I had one case where I hid behind a bus stop, and the freaking AI smashed through the bus stop to crush me. In a recent mission where I was riding along with an AI driver, he actually went off road to drive around a pedestrian that was not even on the road. BI needs to tighten up their drivers scanning a bit.

 

1 hour ago, lordfrith said:

@AZCoder yeah those AI drivers seem to have a real grudge against pedestrians! The rydygier source on BI forums is really cool (reading icognito source :D) but depending on whats needed for mission this might be all thats required. it seems like a suspiciously simple solution, i'm still sure i must have missed something ;)

 

Thanks guys, the murderous AI drivers can't hurt me no more! I still wish someone at Bohemia Interactive will notice that their, oh so friendly civilians aren't as friendly as they seem and correct their behavior once and for all ;)

 

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×