zombo 10 Posted January 6, 2011 (edited) how to do pcar1 and pcar2 follow(chase) car1 ? i tried to find it by my self but I couldn't . I tried this pcar1 doFollow car1 didn't work also this : while {true} do { pcar1 doMove (getPos car1); sleep 1; }; didn't work because pcar1 stopped were the car1 was createdis there a way to make pcar1 follow(chase) car1 ?? Edited January 6, 2011 by zombo Share this post Link to post Share on other sites
loki 1 Posted January 6, 2011 http://community.bistudio.com/wiki/doFollow These commands (Dofollow or CommandFollow) works only if the two units are in the same group. i will try to think of a work around.. unless someone beats me to it. :) Share this post Link to post Share on other sites
RazorX 10 Posted January 6, 2011 http://forums.bistudio.com/showthread.php?t=112731 Same problem :P For now doMove is the best solution or try the script posted in the thread above Share this post Link to post Share on other sites
zombo 10 Posted January 6, 2011 These commands (Dofollow or CommandFollow) works only if the two units are in the same group. that explains alot of things :D, I thought it worked for all units For now doMove is the best solution or try the script posted in the thread above yes it looks like domove is the only solution for now:( thy for help Share this post Link to post Share on other sites
st_dux 26 Posted January 6, 2011 Making a proper police chase with ArmA driving AI would be next to impossible, I'm afraid. You could an AI vehicle to follow a player vehicle, but it would be incredibly easy for the player to lose the tail, so to speak. Share this post Link to post Share on other sites
celery 8 Posted January 6, 2011 If the player isn't driving the getaway car, the chase could be handmade with UnitCapture. Share this post Link to post Share on other sites
RazorX 10 Posted January 8, 2011 (edited) _unit = _this select 0; //must be a unit, not a vehicle _target = _this select 1; //must be a vehicle scopeName "notFollow"; for "_a" from 0 to 1 step 0 do { _unit domove (_target modelToWorld [0,-5,0]); waituntil {unitReady _unit}; //prevent crashing into the car that is being followed when not moving if ((position _unit distance position _target) < 12) then { vehicle _unit setvelocity [0,0,0]; } else { //stop following while the unit is too far away if ((position _unit distance position _target) > 1000) then { breakTo "notFollow"; }; }; }; I've written this code. It makes a unit follow another unit (written for vehicles). It's a pretty good script, works well if both units are AI units. Has some bugs but I really think it's the best of the simple solutions. Feel free to modify it, the loop is infinite and you need to script more events when you want the chase to end. For now the only condition to exit the loop is when the followed vehicle is 1km away from the follower. Edited January 8, 2011 by RazorX Share this post Link to post Share on other sites
zombo 10 Posted January 10, 2011 If the player isn't driving the getaway car, the chase could be handmade with UnitCapture. this is very cool I didn't know about this until now, this is perfect if you play as a cop chasing a civilian vehicle or if you only want to see a police chase :D , I tried it and it works very well , but I want to be the criminal who runs away from cops no the chaser :)I've written this code. It makes a unit follow another unit (written for vehicles). It's a pretty good script, works well if both units are AI units. Has some bugs but I really think it's the best of the simple solutions. Feel free to modify it, the loop is infinite and you need to script more events when you want the chase to end. For now the only condition to exit the loop is when the followed vehicle is 1km away from the follower. I will test it , thank you for the script :) if i have a question I will post it later :D Share this post Link to post Share on other sites
Coffeecat 10 Posted January 10, 2011 Isnt Unit Capture only working for Helos? At least thats what i remember one of the Devs said... Share this post Link to post Share on other sites
celery 8 Posted January 10, 2011 Isnt Unit Capture only working for Helos?At least thats what i remember one of the Devs said... It has always worked for any vehicle. Aircraft motion capture is where it's best suited, though. Share this post Link to post Share on other sites
RazorX 10 Posted January 10, 2011 (edited) IMO UnitCapture is only good in cut scenes. Hell, I hate scripted and predictable behavior - perfect for dumb asshole fans of CoD and MoH :P Edited January 10, 2011 by RazorX Share this post Link to post Share on other sites