curtcooll 1 Posted March 17, 2013 For some reason i got a vehicle with AI unit spawn into it but some reason its showing up as if it is a enemy vehicle even the ai units react to it and say enemy vehicle, but AI friendly is in the chopper its empty vehicle how can i make empty vehicle be a friendly, without spawning a a helicopter with ai already in it. Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 19, 2016 Sorry to make a 3 year bump but I'm having the exact same issue. I'm playing as BLUFOR (3CB). I've spawned an empty BLUFOR (NATO) motorized speedboat. My units are calling out this vehicle as an enemy craft. Is there any workaround for this? The vehicle is from my side and empty. Really not understanding this. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted April 19, 2016 maybe this helps https://community.bistudio.com/wiki/addVehicle Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 19, 2016 maybe this helps https://community.bistudio.com/wiki/addVehicle Yeah I think it will help but how do I write it and where do I put it?From the wiki: _grp addVehicle _vehicleLet's say the vehicle classname is B_Boat_Armed_1 (not real). And my player group is Alpha 1-1. Could anyone show me how to implement that? Share this post Link to post Share on other sites
barbolani 198 Posted April 19, 2016 Edit that vehicle in his init box, and put: (group player) addVehicle this; Now it's yours. Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 19, 2016 Edit that vehicle in his init box, and put: (group player) addVehicle this; Now it's yours. So exactly this in the boat's init line? Regardless of group names or classnames? (group player) addVehicle this;If not could you show me an example? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted April 19, 2016 What barbolani said, also there's already 2 examples on the wiki link. Cheers Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 19, 2016 What barbolani said, also there's already 2 examples on the wiki link. Cheers The wiki says to add my group name to the code.The wiki link to "group name" does not show me how to write it. What is the syntax for Alpha 1-1? And Barbaloni's code doesn't even include the group name prefix. I find it increasingly difficult to get help in this specific subforum because all people do is link the wiki. How can someone learn if they get linked advanced coding techniques that don't literally tell users where to put the code example(s) (init.sqf? Unit init box? Trigger condition?)? Share this post Link to post Share on other sites
Greenfist 1863 Posted April 19, 2016 The wiki says to add my group name to the code. The wiki link to "group name" does not show me how to write it. What is the syntax for Alpha 1-1? And Barbaloni's code doesn't even include the group name prefix. I find it increasingly difficult to get help in this specific subforum because all people do is link the wiki. How can someone learn if they get linked advanced coding techniques that don't literally tell users where to put the code example(s) (init.sqf? Unit init box? Trigger condition?)? group player is a command to get the player's group. You don't use the Alpha 1-1 anywhere. And the wiki doesn't tell you to add the actual name of your group there, it says the command needs its input as a group variable, which is one of the different data types. Put that to the boat's init, where the this variable is the object whose init box it is. 1 Share this post Link to post Share on other sites
barbolani 198 Posted April 19, 2016 In Spain we say "better to teach fishing than gifting fish". The example assumes you have a variable assigned to the player group, like if you say: mySuperGroup = group player; and after that mySuperGroup addVehicle mySuperVehicle; Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 19, 2016 Thanks for the help guys. I'll try to figure it out with what I have. Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 20, 2016 Unfortunately writing it like this in the vehicle init line... (group player) addVehicle this;Does not work.I see each of the speed motorboats does have a default skin option in the editor which is set to random by default. Gonna see if setting it to always BLUFOR works with the code. Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted April 20, 2016 Unfortunately writing it like this in the vehicle init line... (group player) addVehicle this;Does not work.I see each of the speed motorboats does have a default skin option in the editor which is set to random by default. Gonna see if setting it to always BLUFOR works with the code. That didn't work either. Share this post Link to post Share on other sites