murraywcourt 10 Posted September 14, 2013 Benevolent hivemind, I have speedboats carrying squads and fire teams using assault boats attacking a beach. The players are getting ready for them, and I want there to be an option for the players to speed forward time to where the boats are 500m from the shoreline. I would have thought that this would involve a simple setpos command, however i have instead been through several hours of debugging hell. Setpos works, but the boats don't move afterwards. My solution is to move the boats, clear their waypoints and reissue their waypoints. This works for the assault boats fine, however the speedboats with separate crew and cargo do not. The utterly infuriating thing about this problem is that I have reconstructed it EXACTLY in a smaller scenario and it works perfectly. After teleporting the speedboat I have even tried adding the waypoints explicitly using the debug console (something that also works in the test scenario), to no avail. Why would addwaypoint statements lose their effect in large scenarios? Have I stumbled upon some form of limitation or bug? Here is the script: //move smallboats - this part works perfectly, even when code plaed after the code for big boats _sboats=[sb_1, sb_2, sb_3, sb_4, sb_5, sb_6, sb_7, sb_8, sb_9]; _sgroups = [sgroup_1, sgroup_2, sgroup_3, sgroup_4, sgroup_5, sgroup_6, sgroup_7, sgroup_8, sgroup_9]; //move boats { _marker = format["sbtp_1km_%1", (_forEachIndex + 1)]; _x setpos (getmarkerpos _marker); }forEach _sboats; //clear waypoints {while {(count (waypoints _x)) > 0} do {deleteWaypoint ((waypoints _x) select 0);} }forEach _sgroups; //reassign orders execVM "sgorders.sqf"; //move big boats //tp boats { _marker = format["btp_1km_%1", (_forEachIndex + 1)]; _x setpos (getmarkerpos _marker); }forEach [b_1, b_2, b_3, b_4, b_5]; //strip waypoints {while {(count (waypoints _x)) > 0} do {deleteWaypoint ((waypoints _x) select 0);} }forEach [b_1, b_2, b_3, b_4, b_5]; {while {(count (waypoints _x)) > 0} do {deleteWaypoint ((waypoints _x) select 0);} }forEach [group_1, group_2, group_3, group_4, group_5]; //reasign waypoints { _marker2 = format["b_land_%1", (_forEachIndex + 1)]; _wp2 = (group _x) addWaypoint [getMarkerPos _marker2, 0]; _wp2 setWaypointType "TR UNLOAD"; _wp2 setWaypointSpeed "LIMITED"; _wp2 setWaypointCompletionRadius 50; }forEach [b_1, b_2, b_3, b_4, b_5]; execVM "gorders.sqf"; //issues orders to the cargo squads. hint "script complete"; This is driving me mad! Any light that the community could shed upon this issue would be greatly appreciated. Share this post Link to post Share on other sites
kylania 568 Posted September 14, 2013 You have "sbtp_1km_%1" before the teleport and "btp_1km_%1" after, are those supposed to be the same? Share this post Link to post Share on other sites
murraywcourt 10 Posted September 14, 2013 Yes one set of markers is used for small boats and one for the speed boats so they dont file on top of each other. The telepoert/setpos part works fine, its just the addwaypoint part that doesn't work for no reason that I can see. Share this post Link to post Share on other sites
murraywcourt 10 Posted September 15, 2013 I have tested it in the smaller scenareo and my first idea was right! All i need do it setpos and the waypoints should still work. I have come across a bug. i will post this on the bug tracker. Share this post Link to post Share on other sites