scottb613 285 Posted September 26, 2024 Hi Folks, I'm trying to make a scripted waypoint - report on completion - via the side chat. Spent hours and hours on this - I just want to report arrival at waypoint with a group count. From past experience - on simpler statements - I had to assemble a string for use with "setWaypointStatements". Any suggestions appreciated. // Build the string manually private _strReport = format [ "private _grp = %1; private _wpName = '%2'; private _groupLeader = leader _grp; private _groupLeaderName = name _groupLeader; private _groupName = groupId _grp; if (_groupName == '') then { _groupName = format ['%1''s group', _groupLeaderName]; }; private _memberCount = count units _grp; [[_groupLeader], 'SIDE', format ['%1: Reached waypoint %2 with %3 members.', _groupName, _wpName, _memberCount]] remoteExec ['sideRadio']; ", _grp, _markerName]; // Set the waypoint statement _wp setWaypointStatements ["true", _strReport]; Thanks. Regards, Scott Share this post Link to post Share on other sites
gc8 981 Posted September 26, 2024 the format is not going to work because _grp will become string and not the actual variable its better to put the code in function like this: private strReport = { // Rest of the code here }; Then call it like this: _wp setWaypointStatements ["true", "call strReport"]; 2 Share this post Link to post Share on other sites
scottb613 285 Posted September 26, 2024 Hi... Thanks - I'll give that a try. Regards, Scott Share this post Link to post Share on other sites
panther42 52 Posted September 27, 2024 Scott, with what @gc8 stated above, here's an example from @Larrow which can help guide your endeavors... 1 Share this post Link to post Share on other sites
scottb613 285 Posted September 27, 2024 Hi... Thanks much - I'm certainly no expert but I've written many scripts to do many things - this one is giving me fits. I'll take a look. Regards, Scott Share this post Link to post Share on other sites
panther42 52 Posted September 27, 2024 Remember, setWaypointStatements works with this & thisList within the Condition & Statement code string. Utilize these for the information you seek to display On 9/26/2024 at 9:23 AM, scottb613 said: I just want to report arrival at waypoint with a group count 1 Share this post Link to post Share on other sites