Spriterfight 10 Posted March 23, 2020 I usually make separate script file with waypoints for the ai to move there every time if they respawn so their waypoint dosent get disapeared but are there an easier method to do this than make every individual group a script.sqf? Share this post Link to post Share on other sites
RCA3 593 Posted March 25, 2020 @Spriterfight You can create invisible markers on your map for each group's path, and then just pass each array of markers along with the group to your script, e.g: [grp1, ["grp1mkr1", "grp1mkr2", "grp1mkr3", "grp1mkr4"]] execVM "addpath.sqf"; //addpath.sqf params ["_group", "_markers"]; { _group addWaypoint [getMarkerPos _x, 0]; }forEach _markers; 1 Share this post Link to post Share on other sites
Larrow 2822 Posted March 25, 2020 On 3/23/2020 at 2:29 PM, Spriterfight said: for the ai to move there every time if they respawn How are the units spawning? If you want to place the waypoints visually in the editor you could use copyWaypoints command. For example, say you have a spawnAI module and you want all groups spawned by the module to follow a certain set of waypoints... Place the spawnAI module Place a unit in the editor near the module In the units Init attribute place the following code... this disableAI "All"; this hideObjectGlobal true Sync the unit to the module Give the unit the waypoints you want all spawned groups to follow In the spawnAI modules Expression attribute place... params[ "_group", "_module" ]; _waypointHolder = synchronizedObjects _module select 0; _group copyWaypoints group _waypointHolder; TEST_MISSION Job done, no external script files, easy to edit waypoints. 1 1 Share this post Link to post Share on other sites
Spriterfight 10 Posted March 25, 2020 Thank you guys!Usually i dont use spawn module because its limited and it's a lot of work to configure it. Share this post Link to post Share on other sites
Von Quest 1163 Posted March 25, 2020 Or.... Random Waypoints. Just paste into squad leader's init box: https://community.bistudio.com/wiki/BIS_fnc_taskPatrol 1 Share this post Link to post Share on other sites
Larrow 2822 Posted March 25, 2020 3 hours ago, Von Quest said: Just paste into squad leader's init box: On 3/23/2020 at 2:29 PM, Spriterfight said: if they respawn AI dont actually respawn so placing anything in their init would not solve the issue, unless specifically written to handle it. 7 hours ago, Spriterfight said: Usually i dont use spawn module So the question still remains... What are you using to spawn/respawn the AI? 1 Share this post Link to post Share on other sites
Von Quest 1163 Posted March 26, 2020 Derp. Sped-read while tired. Yup, sorry. 1 Share this post Link to post Share on other sites
Spriterfight 10 Posted March 26, 2020 18 hours ago, Larrow said: AI dont actually respawn so placing anything in their init would not solve the issue, unless specifically written to handle it. So the question still remains... What are you using to spawn/respawn the AI? i make them playable and via multiplayer respawn markers and add them eventhadnler when respawn thats gives them waypoint Share this post Link to post Share on other sites