Jump to content
Sign in to follow this  
kaski

Waypoints and AI drivers

Recommended Posts

I have created a scenario where players are captured and in jail. While players are in jail, I have set all factions as friendly (setFriend). After small scenes etc comes a transporter where is a Independent driver which drives in front of the jail. Enemy AI unloads an ammobox which is boobytrapped and it explodes in few sec killing the guards (setDamage). In this point alarm sound is played, everyone is enemy for OPFOR and players should get in the vehicle. Few independent spawns and tries to kill more OPFOR guards as a nice effect among with exploding tanks etc and the independent driver should wait for 25 sec until he starts driving (sleep 25 set in script, switch trigger synced to the waypoint where variable change triggers the the driving). This is where the problems start.

The independent driver is just too random. Seems like there is many possibilities of what he does after this. These I have seen:

- He starts driving instantly when shooting starts, I think cause the truck takes bullet. Got a workaround with temp godmode (allowDamage false), not ideal but works

- He starts spinning after MOVE command

- He doesn't drive 2 meters further

- Driver goes to wrong way after MOVE command (he should drive little forward and then turn left but he turns right)

- Driver drives over rocks, trees... damaging wheels

- Driver gets stuck on rocks, trees, bushes....

Is the waypoint system just so random or what am I doing wrong? Is there any addons or scripts to make the driver go less random? If the driver would just drive same route by 100% chance it would be easy to just move waypoints so it doesn't get stuck but no, even route changes..

Heres a image of AIs waypoints. Its the red line.

https://www.dropbox.com/s/yt4ojfhvkv3mf86/2014-06-30_00001.jpg

https://www.dropbox.com/s/hjvj8kl6uqhzqz6/2014-06-30_00002.jpg

Edited by kaski

Share this post


Link to post
Share on other sites

I don't create waypoints directly on the map, but I generate them directly at the start of the mission (init.sqf), and I haven't got these problems. So edit and use my dynamic waypoint creator simple script.

Edited by [CSLA]LUKI
typo

Share this post


Link to post
Share on other sites

Hello kaski,

Sounds a good scene.

You didn't mention so maybe you are missing the key point.

Driver must be CARELESS, by waypoint or scripting command. Indeed I recommend you the command, don't ask me why in a chopper insertion on Antistasi, creating waypoints with CARELESS didn't work.

This will solve, for example, the issues when under fire...

An additional disableAI "TARGET" and "AUTOTARGET" may help.

BUT, maybe also you are having pathfinding problems.

If the driver encounters units on the road, he may try to search for another route, or stop and wait....

EVEN (sometimes happens), ingame engines meeses up the specific route you want. It happens for example from Stratis Airport to Agia Marina, vehicles never reach destination and it's a reported bug.

Hope this helps.

Share this post


Link to post
Share on other sites

Thank you both for the reply. I tried few hours to get this working with all things I could think of. To maintain my mental health I decided to move my starting to different location. There are no more rocks, fences and bushes and the driver is now driving as I want. I put him on careless and disabled target and autotarget.

@[CSLA]LUKI:

Thank you for your script. I will use it in future as it does not mess the editor.

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
Sign in to follow this  

×