Luft08 27 Posted February 24, 2022 I want to execute a function after units reach their given waypoint but the function takes an argument. I wanted to use setWaypointStatements but the argument is in a private variable and it is not possible to place the argument into a global variable because the function gets executed by many AI units that require the argument have different values. Is there any way to do this? Share this post Link to post Share on other sites
alpha993 122 Posted February 24, 2022 Try using setVariable on the units to store the value of the private variable, and then recall it when calling your function. When you define your private variable: TAG_unit setVariable ["TAG_myPrivateArgument", _privateVar]; When the unit completes the waypoint: [(TAG_unit getVariable "TAG_myPrivateArgument")] call TAG_fnc_myFunction; 1 Share this post Link to post Share on other sites