easyeb 137 Posted July 27, 2017 So, I'm trying to ad an action to myself that reads "Get in the vehicles" that makes AI guys in my group run to, and board specific spots in specific vehicles. I have VEHICLE1 and VEHICLE2. My group consists of units A1, A2, A3 and A4. I am A1. The rest are AI. I want dude A2 to get in as passenger in vehicle 1, A3 to get in as driver in VEHICLE2 and A4 to get in as passenger in VEHICLE2. If any of you have a couple of minutes, can you please just show me how this code is supposed to look? Share this post Link to post Share on other sites
7erra 629 Posted July 27, 2017 player addAction ["Board vehicles", { A2 assignAsCargo VEHICLE1; A3 assignAsDriver VEHICLE2; A4 assignAsCargo VEHICLE2; [A2,A3,A4] orderGetIn true; }]; And if you want to remove the action afterwards: Spoiler player addAction ["Board vehicles", { A2 assignAsCargo VEHICLE1; A3 assignAsDriver VEHICLE2; A4 assignAsCargo VEHICLE2; [A2,A3,A4] orderGetIn true; player removeAction (_this select 2); }]; 1 Share this post Link to post Share on other sites
pierremgi 4906 Posted July 28, 2017 7 hours ago, easyeb said: So, I'm trying to ad an action to myself that reads "Get in the vehicles" that makes AI guys in my group run to, and board specific spots in specific vehicles. I have VEHICLE1 and VEHICLE2. My group consists of units A1, A2, A3 and A4. I am A1. The rest are AI. I want dude A2 to get in as passenger in vehicle 1, A3 to get in as driver in VEHICLE2 and A4 to get in as passenger in VEHICLE2. If any of you have a couple of minutes, can you please just show me how this code is supposed to look? I guess you are not leader. Because, if you are, why don't you use the engine "mount" menu (4)? Share this post Link to post Share on other sites
easyeb 137 Posted July 28, 2017 15 hours ago, 7erra said: player addAction ["Board vehicles", { A2 assignAsCargo VEHICLE1; A3 assignAsDriver VEHICLE2; A4 assignAsCargo VEHICLE2; [A2,A3,A4] orderGetIn true; }]; And if you want to remove the action afterwards: Reveal hidden contents player addAction ["Board vehicles", { A2 assignAsCargo VEHICLE1; A3 assignAsDriver VEHICLE2; A4 assignAsCargo VEHICLE2; [A2,A3,A4] orderGetIn true; player removeAction (_this select 2); }]; It doesn't work. I get the action, but the AI doesn't do anything. Share this post Link to post Share on other sites
7erra 629 Posted July 28, 2017 I always test my code before I post here and this time it works for me too. There has to be something else in your mission setup that makes it impossible for the soldiers to man the vehicles. Does the group posses any other vehicles beforehand? Are the variable names correct? Are the vehicles unlocked? Are the vehicles reachable? Are the vehicles only manned by units of the same side? etc. etc. Share this post Link to post Share on other sites
easyeb 137 Posted July 28, 2017 7 minutes ago, 7erra said: I always test my code before I post here and this time it works for me too. There has to be something else in your mission setup that makes it impossible for the soldiers to man the vehicles. Does the group posses any other vehicles beforehand? Are the variable names correct? Are the vehicles unlocked? Are the vehicles reachable? Are the vehicles only manned by units of the same side? etc. etc. I appreciate you taking the time. I'm trying on a test mission with only the units (A1, A2, A3, A4) and the vehicles (VEHICLE1, VEHICLE2) placed empty, unlocked only meters from the units. Trippledoublechecked the names. A2 MoveInCargo VEHICLE1 places A2 as passenger in VEHICLE1. I'm sure I'm doing something wrong. I'm just trying to figure out what it is. Thank you for your patience. Test mission is here: https://www.dropbox.com/s/0gbdpqbqlofqzej/OrderGetIn.Stratis.rar?dl=0 Share this post Link to post Share on other sites
das attorney 858 Posted July 28, 2017 Have a look at the wiki: Quote orderGetIn won't take effect on player controlled AI units, and which needs to be used together with assaignAs command family. Generally speaking, orderGetIn is a Role Excuator. https://community.bistudio.com/wiki/orderGetIn Might be worth trying getin action https://community.bistudio.com/wiki/Arma_3_Actions#GetInCargo A2 assignAsCargo VEHICLE1; A2 action ["getInCargo", VEHICLE1]; // etc etc You can specify the seat with the alternate syntax (see the link) If you do that, don't run it from the init line or it will most likely fail. Run it from action or script (trigger etc) Share this post Link to post Share on other sites
das attorney 858 Posted July 28, 2017 BTW: Your test mission has some mods which I don't have: === Missing Addons === asr_ai3_cfgvehicles === Active Addons === A3_Soft_F A3_Characters_F Plus, it's referencing pbo's from Arma 3 Alpha for some reason. Is your Arma up to date? Share this post Link to post Share on other sites