Barry the baldy 0 Posted May 3, 2008 Howdy all, I'm having some trouble getting men to disembark a vehicle (stryker) and move to a marker position, face a given direction and kneel. To get them to mount I've used the "assignascargo" and "ordergetin" commands and they all mount up just fine, trouble comes when I want them to dismount and move to their positions. Here is the script that activates once the Stryker hits the unload waypoint. man1 doMove getmarkerPos "a" man1 doWatch getdir "markerwatch" man1 setunitpos "middle" man2 doMove getmarkerPos "b" man2 doWatch getdir "markerwatch" man2 setunitpos "middle" man3 doMove getmarkerpos "c" man3 doWatch getdir "markerwatch" man3 setunitpos "middle" man4 doMove getmarkerpos "d" man4 doWatch getdir "markerwatch" man4 setunitpos "middle" man5 doMove getmarkerpos "e" man5 doWatch getdir "markerwatch" man5 setunitpos "middle" man6 doMove getmarkerpos "f" man6 doWatch getdir "markerwatch" man6 setunitpos "middle" man7 doMove getmarkerpos "g" man7 doWatch getdir "markerwatch" man7 setunitpos "middle" man8 doMove getmarkerpos "h" man8 doWatch getdir "markerwatch" man8 setunitpos "middle" man9 doMove getmarkerpos "i" man9 doWatch getdir "markerwatch" man9 setunitpos "middle" exit I've tried using an unload waypoint on the Stryker and they all unload and spin in circles. I've also tried using the "unassignvehicle" command in the script to no avail. Tried calling the script form a trigger and from the Strykers waypoint with no luck. The units aren't grouped since I need them to move to specific points. Anyone have any ideas? Share this post Link to post Share on other sites
LtCmdrBoon 0 Posted May 3, 2008 man1 action ["eject", vehicle man1] man2 action ["eject", vehcile man2] // etcetc man1 domove getmarkerpos "a" man2//..etcetc man1 setdir 45 //or whatever you can also use invisible helepads instead of markers to get direction man1 domove getpos invizipad1 man1 setdir getdir invizipad1 the dowatch makes them 'look' at something, so if you had 10 men all outside a town, you could have a inviz pad in the middle and do a man1 dowatch towncentre now looking at ur script, you order each man to a position, then you are making a mistake with the dowatch, dowatch looks at a unit, not at the direction of a marker. also you are using setunitpos, but without any waiting. you need to wait for the unit to reach its location b4 u set his direction and stance. either have a delay, or seperate scripts for each unit looking like this: strykerwp.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [] exec "man1.sqs" [] exec "man2.sqs" etcetc man1.sqs (u need 1 for each man) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> man1 action ["eject", vehicle man1] man1 domove getpos invizipad1 @(man1 distance invizipad1 < 10) //waits until man1 is @ the pad ~5 man1 setdir getdir invizipad1 // or man1 dowatch invisiblepadtowatch ~1 man1 setunitpos "MIDDLE" Share this post Link to post Share on other sites
Barry the baldy 0 Posted May 3, 2008 Thanks for the help mate. Worked a charm. Share this post Link to post Share on other sites