felipechapmanfromm 5 Posted June 2, 2018 I have 3 variables for heli's sarheli0, sarheli1 and sarheli2 imported from the mission. how would I put them into the near objects so I can assign an AI to get in the heli in the trigger zone (script is triggered from another script) this is my code casGroup = _this select 0; casPos = _this select 1; casSpawn = _this select 2; sarheli = _this select 3; sarheli1 = _this select 4; sarheli2 = _this select 5; _heliTypeSearch = casPos nearObjects [['sarheli0','sarheli1','sarheli2'],40]; _heliType = _heliTypeSearch select 0; casSpawn assignAsCargo _heliType; [casSpawn] orderGetIn true; Cheers. Share this post Link to post Share on other sites
zagor64bz 1225 Posted June 2, 2018 22 minutes ago, felipechapmanfromm said: this is my code, fix it WOW dude...you're on a good start with that statement....just wait and see:there's gonna be plenty of peoples willing to help ya, brotha! 1 1 Share this post Link to post Share on other sites
felipechapmanfromm 5 Posted June 2, 2018 I have changed it, can u help me Share this post Link to post Share on other sites
felipechapmanfromm 5 Posted June 2, 2018 I solved it with casGroup = _this select 0; casPos = _this select 1; casSpawn = _this select 2; _getIn = casGroup addWaypoint [position player, 0]; [casGroup, 1] setWaypointType "GETIN NEAREST"; 2 Share this post Link to post Share on other sites
HazJ 1288 Posted June 3, 2018 Glad you figured it out! Suggestion(s): - Use params command https://community.bistudio.com/wiki/params - Make those variables local, no need for them to be global. params ["_casGroup", "_casPos", "_casSpawn"]; _getIn = _casGroup addWaypoint [position player, 0]; [_casGroup, 1] setWaypointType "GETIN NEAREST"; From your last snippet. You don't need to pass _casPos and _casSpawn unless you are going to use them. 1 Share this post Link to post Share on other sites
felipechapmanfromm 5 Posted June 3, 2018 9 hours ago, HazJ said: Glad you figured it out! Suggestion(s): - Use params command https://community.bistudio.com/wiki/params - Make those variables local, no need for them to be global. params ["_casGroup", "_casPos", "_casSpawn"]; _getIn = _casGroup addWaypoint [position player, 0]; [_casGroup, 1] setWaypointType "GETIN NEAREST"; From your last snippet. You don't need to pass _casPos and _casSpawn unless you are going to use them. Thanks for the help, _casPos and _casSpawn are used later in the script. Share this post Link to post Share on other sites
felipechapmanfromm 5 Posted June 3, 2018 when I fly a helicoper to the AI he won't get in, but with a boat it has. I have not tried with a car. (the heli was a hellenic mod one) what is wrong with the code that makes this happen, or is it the mod ps. with waypoints in the editor the AI happily get into the heli Share this post Link to post Share on other sites
HazJ 1288 Posted June 3, 2018 Out on mobile. Make sure heli is friendly, etc... Try to reveal it as well. Share this post Link to post Share on other sites
felipechapmanfromm 5 Posted June 3, 2018 (edited) how do you mean by reveal Edit: found it, could I use {casSpawn reveal _x} forEach allUnits; to reveal everyone to the ai? Edited June 3, 2018 by felipechapmanfromm Share this post Link to post Share on other sites