Pred42 10 Posted March 16, 2013 I'm making a mission where you have to rescue a hostage. When you get to him I would like him to follow and get on a heli for the escape. (It would be cool if he could get on a separate heli that I'm not on as well) How would I go about doing this? I know there's a mission someone made that had this feature but I can't find how to do it. Thanks in advance. Share this post Link to post Share on other sites
Muzza 0 Posted March 16, 2013 Give the player a JOIN AND LEAD waypoint at the hostages feet, use the description to change this to 'rescue hostage'. Give the hostage a JOIN waypoint at his own feet and use synchronize (F5) to link the two. The hostage should start to follow the player when they make close contact. Make sure the player is a higher rank to the hostage. Share this post Link to post Share on other sites
cobra4v320 27 Posted March 16, 2013 (edited) waitUntil {_soldier distance _hostage < 10}; [_hostage] joinSilent (group _soldier); waitUntil {_hostage distance _rescueheli < 30}; [_hostage joinSilent grpNull; sleep 0.5; [_hostage joinSilent (group _rescueheli); _hostage assignasCargo _rescueheli; [_hostage] orderGetIn true; Edited March 16, 2013 by cobra4v320 Share this post Link to post Share on other sites
Muzza 0 Posted March 16, 2013 I am feeling slightly defeated by your solution cobra :D Share this post Link to post Share on other sites
kilrbe3 37 Posted March 16, 2013 I am feeling slightly defeated by your solution cobra :D Don't worry, we all do at times when he post his great vast knowledge of logic :) Share this post Link to post Share on other sites
cobra4v320 27 Posted March 16, 2013 Waypoints work also. You can also use triggers. You can also check this out. http://www.kylania.com/ex/?p=11 Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted March 17, 2013 Waypoint example I use often, AI follows a point 50m behind player, updated every 10 seconds: _wp1 = (group _aiUnit) addWaypoint [[0,0,0],0]; _wp1 setWaypointType "MOVE"; while {alive player} do { _wp1 setWaypointPosition [(player ModelToWorld [0,-50,0]), 0]; (group _aiUnit) setCurrentWaypoint _wp1; sleep 10; }; change the condition to whatever you want - most useful with a variable true/false switch. Share this post Link to post Share on other sites
vargyr 1 Posted April 6, 2013 Mattar_TharkariWaypoint example I use often, AI follows a point 50m behind player, updated every 10 seconds: Code:XXX Pardon my newb, but where does that code go, Mattar? Share this post Link to post Share on other sites
Tuliq 2 Posted April 6, 2013 (edited) Waypoint example I use often, AI follows a point 50m behind player, updated every 10 seconds: _wp1 = (group _aiUnit) addWaypoint [[0,0,0],0]; _wp1 setWaypointType "MOVE"; while {alive player} do { _wp1 setWaypointPosition [(player ModelToWorld [0,-50,0]), 0]; (group _aiUnit) setCurrentWaypoint _wp1; sleep 10; }; change the condition to whatever you want - most useful with a variable true/false switch. What is the reasoning behind using ModelToWorld instead of getpos? Just a question since I can't seem to wrap my head around it :p OH I get it... easy way to define distance relative from the players model. Great! Edited April 6, 2013 by Tuliq Share this post Link to post Share on other sites