tobmic 10 Posted February 14, 2010 Hello I searched forum before and found some other posts but not realy that what i was looking for. I want to give a Warfare Barrack an action to recruit AI soldier that go to the player group and when the player disconnects the AI soldier delete again. Aswell if the ai soldiers die that theyre corpse get removed after some time. Also a max ai number that a player can recruit in his group. Help in this would be really great i tried all weekend to get into this but seems like my scripting skill still sux : ( P.S it should run with a script and the Warfare Barrack should not get destroyed Share this post Link to post Share on other sites
tobmic 10 Posted February 14, 2010 no one knows ? ( Share this post Link to post Share on other sites
tedbell 0 Posted February 14, 2010 Perhaps you could pull the code from Xeno's Domination map. He has a barracks at the base where you can recruit AI soldiers. There is also an array for maximum AI based on player rank, but you could change that. Also, you could add your own custom soldiers besides the default selection. Share this post Link to post Share on other sites
tobmic 10 Posted February 15, 2010 Perhaps you could pull the code from Xeno's Domination map. He has a barracks at the base where you can recruit AI soldiers. There is also an array for maximum AI based on player rank, but you could change that. Also, you could add your own custom soldiers besides the default selection. you have any idea how to do that ? Share this post Link to post Share on other sites
tobmic 10 Posted February 16, 2010 anyone ? ........ Share this post Link to post Share on other sites
-TW- Quintus 10 Posted February 17, 2010 I use this: Alright man check it out. In my mission folder I have several sqS files (as opposed to sqf) dunno if it matters but thats how I saw it done. The following one named hirerifeman.sws "USMC_Soldier" createUnit [getmarkerpos "hire", group player]; and than in the barracks init i have this addaction ["Recruit Rifleman1", "hirerifleman.sqs"]; My guy spawns at marker named "hire". I Only thing I need now is a simple way to dismiss them. Share this post Link to post Share on other sites
sxp2high 22 Posted February 22, 2010 Hi, i just created a very simple script for recruiting ai soldiers... You can get it here! It's for recruiting squads, but it can easily be changed for recruiting single soldiers. It also has a dismiss function. (the units leave your squad and get deleted) Tested on dedicated server. I think i fixed all bugs already! :) You have to edit ALL files inside the Recuit folder and add the line into the init.sqf like you see in the example mission. Just take a look at it! If you have any questions about installing and changing, i will help you. Be advised: I suck at scripting :) so maybe the code sucks, but it's working! Share this post Link to post Share on other sites
tobmic 10 Posted February 22, 2010 cool thanks sxp2high can you change the script for me that its not defined to a name like charlie_1 ? So that everyone can recruit soldiers Share this post Link to post Share on other sites
sxp2high 22 Posted February 22, 2010 I don't know how to do that, sorry... Exactly: I don't know how to limit the amount of soldiers then and how to assign the correct group. That's why i'm using sepperate scripts for each group. Share this post Link to post Share on other sites
manzilla 1 Posted February 24, 2010 cool thanks sxp2highcan you change the script for me that its not defined to a name like charlie_1 ? So that everyone can recruit soldiers All you need to do is change that name to the one you want. Or use player. Share this post Link to post Share on other sites
sxp2high 22 Posted May 28, 2010 Hi, i improved the recruit script. Less editing needed now. It's still very simple and easy. No rank check or so. It's still designed for squad leaders. In other words: Not every player can recruit, only squad leaders. ...but, i could create a version for every player if you need that. Just ask for it. Download the sample Mission here. A small how-to: Edit both triggers (see mission). Should be self explaining. init.sqf Add this for each group to enable the recuiting at mission start. EchoEmpty = true; EchoDismiss.sqf Edit these two lines at the top. _unit = echo_1; // the unit which recruits the ais EchoDismiss = true; // group name dismiss EchoRecruit.sqf Edit these lines at the top. _unit = echo_1; // the unit which recruits the ais _spawnpos = (getmarkerpos "SpawnSquads"); // where the ais get spawned EchoEmpty = false; // group name empty Add as much as you like here. (Line 12) // create ais _ai1 = "USMC_Soldier" createUnit [_spawnpos, _group]; Edit this three lines. (Line 17, 19 and 20) waitUntil {EchoDismiss}; EchoEmpty = true; // group name empty EchoDismiss = false; // group dismiss Share this post Link to post Share on other sites
Deg 10 Posted August 9, 2010 Hello all another newb question from a newb scripter, firstly i can hire a rifle man from my barracks using from my radio trigger juliet, "USMC_Soldier createUnit [getmarkerpos "hire", group player];and in my barracks i have, barracks addaction ["Recruit Rifleman1", "hirerifleman.sqs"]; with a marker named "hire". So i tried doing the same but hiring a corpseman from the field hospital using radio trigger india,"USMC_Soldier" createUnit [getmarkerpos "hire1", group player]; and for the hospital i have, hospital addaction ["Recruit Corpsman1", "hire1corpsman.sqs"]; with a marker named "hire1" but instead of a corpsman spawning from the hospital a rifeman spawns. What am i doing wrong tks in advanced. :) Share this post Link to post Share on other sites
teilx 4 Posted September 3, 2010 (edited) @sxp2high can you reupload your sample mission somebody else??? Edited September 3, 2010 by TeilX Share this post Link to post Share on other sites
horror1 10 Posted September 13, 2010 i second that, pls reupload your mission. :) Share this post Link to post Share on other sites
foxsch 3 Posted September 13, 2012 @sxp2high ~ Broken Link : -( Share this post Link to post Share on other sites
ht-57 0 Posted September 14, 2012 Check this out ,works gr8 4 me! http://forums.bistudio.com/showthread.php?107549-AI-Recruitment&highlight=recruit Share this post Link to post Share on other sites