Jump to content
mikie boy

[FOCK] AI Recruit - Cheap and cheer full

Recommended Posts

Knock urself out dude. Im slowly upgrading it to a less cheap and cheerful version ;)

Share this post


Link to post
Share on other sites

UPDATED VERSION

Download link

https://dl.dropboxusercontent.com/u/17725328/BIS_forum/A3Fock_Recruit_GrpMan.rar

Updated version…

This version has the added extra of Group management (concept taken from Zuff’s Group management).

This version contains the following…

• AI recruitment process – selection of 6 types of soldiers. Automatically identifies which side you are on so no fiddling with sides.

• AI deletion from group, if group leader.

• Whole AI squad deletion, if group leader.

• New – Group Management.

• Leave current group.

• Join a new group from a selection of groups (AI groups, Human Groups, and Mixed groups).

• View other groups, for AI players.

• Specifically view human players within a group to assist with locating friends.

• Identification of your own group.

• Step down as leader.

• Become leader – MP compatible.

• Options to turn off/on the menu.

• Option to turn off/on just AI recruitment.

• Option to increase/decrease Amount of AI to recruit.

• Option to turn off/on Deletion AI when leaving a group with no Humans in it.

• Option to turn off/on Group clear up of empty groups.

Anyway - hope this is useful.

Installation -------

Simply copy the code below into your init.sqf

waitUntil { isServer ||!isNull player };

ExecVM "FOCKRecruitAI\RecruitInit.sqf";

Edited by Mikie boy

Share this post


Link to post
Share on other sites

Huh!!!??? Its the same as before mate...

Dirty Haz

Edited by Dirty Haz

Share this post


Link to post
Share on other sites
Here you go - tried and tested

https://dl.dropbox.com/u/17725328/%5BFOCK%5DRecruitTest.Stratis.rar

if you still can t get it working - whack both markers down red and blue - see if that helps - but a check is run for the correct side so it shouldnt really matter.

And heres an example without the need for the markers and an addaction has been applied to teh barrel - so its always attached.

https://dl.dropbox.com/u/17725328/%5BFOCK%5DRecruitTestAddaction.Stratis.rar

woah nice, I was litterally about to ask, how would you make a marker or a proximity to a barrel or vehicle allow the interface to be used? I am running a survival type crash mission and I want you to have to get to the comms tower before calling them in, lol

could you assist me?

I was looking through and found something like

Bluemarker

Bluformarker and put down a marker.. but I can still use the menu at any range....

Share this post


Link to post
Share on other sites

You could use the add action option instead of the marker like I do.

Remove the marker and place down a object, in the object init add the following...

this addAction [("<t color=""#00C3FF"">" + ("Open AI Recruit Menu") +"</t>"), "Scripts\FOCKRecruitAI\RecruitMenu.sqf",[],1,false,true];

Dirty Haz

Share this post


Link to post
Share on other sites

go into the Fockrecuirt AI folder - then go into the RecruitAction.sqf - there will be two lines commented out - uncomment them out, and comment out the similar lines... Should look now as follows

		    waitUntil {!recruit_active &&(alive player)&& !outofzone};
//		    waitUntil {!recruit_active &&(alive player)};
	    _addmenu = player addAction [("<t color=""#66FFFF"">" + ("Group/Recruit Menu") +"</t>"), "FOCKRecruitAI\RecruitMenu.sqf",[],1,false,true];
	    waitUntil {recruit_active || (!alive player)|| outofzone};
//		    waitUntil {recruit_active || (!alive player)};

This will allow you to use the marker system and distance - just need to pace the correct markername down for the correct team - named as follows

red - RecruitRed

blue - RecruitBlue

distance is set by the third parameter at the start up of the game

or as Dirty Haz stated - add the addaction to a barrel.. should still work for MP

Share this post


Link to post
Share on other sites

Haha awesome, so should I still reverse those settings like you posted AND THEN use the addaction thing Dirty Haz is using instead of a marker?

Thanks, also wait a sec, I dont remember a barrel in the editor, do you use any unlocking mods for the editor?

Thanks!

**EDIT**

wow... lovely.... I did all that, and when I walked up to the barrel and tried to activate the menu, nothing happens....

also would it be possible to do the same with this?

http://www.armaholic.com/page.php?id=19751

Really getting annoyed with the settings menu constantly being up.... lolol

and what do you mean third parameter? was I supposed to copy the stuff inside description? I did....

Edited by SturmFalkeRDA

Share this post


Link to post
Share on other sites

you can have both - change the script as i have said and add your marker - also add an object and add to its init line the code Dirty Haz provided and make sure the folder location is the same - if its dedicated are you getting the action?

or you can simply leave the script as is and add the add action to an object as suggested by Dirty Haz - if you are still struggling ill see if i can add that option .

As for your suggestion yeah i could but that's a different game management process all together - so i'm not really going to tinker with that within this project sorry dude

Share this post


Link to post
Share on other sites
you can have both - change the script as i have said and add your marker - also add an object and add to its init line the code Dirty Haz provided and make sure the folder location is the same - if its dedicated are you getting the action?

or you can simply leave the script as is and add the add action to an object as suggested by Dirty Haz - if you are still struggling ill see if i can add that option .

As for your suggestion yeah i could but that's a different game management process all together - so i'm not really going to tinker with that within this project sorry dude

Well, my problem is when you activate the open menu option, it simply does not open....

you can spam the option all day....

this is only when it is set to the area or the thing Dirty Haz posted setting....

are these correct? or?

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// [FOCK] Mikie J
//////////////////////////////////////////////////////////////////


sleep 2;
if (!isdedicated) then                                   //not run on the dedicated server - client side 
{

[] spawn 								// calls the below script used for a loop
{

private ["_recruit","_startmarker", "_addmenu"];//declaring	
waituntil {!isnull player};
recruit_active = false;
outofzone = false;

if (!isnull player) then 
{

	while {true} do 
	{

	    waitUntil {!recruit_active &&(alive player)&& !outofzone};
//		    waitUntil {!recruit_active &&(alive player)};
	    _addmenu = player addAction [("<t color=""#66FFFF"">" + ("Group/Recruit Menu") +"</t>"), "FOCKRecruitAI\RecruitMenu.sqf",[],1,false,true];
	    waitUntil {recruit_active || (!alive player)|| outofzone};
//		    waitUntil {recruit_active || (!alive player)};
	    player removeAction _addmenu;



	};//while

}; //if !is null
}; // []spawn
}; //!isserver

Share this post


Link to post
Share on other sites

Do you have the parameters set/enabled?

Dirty Haz

Share this post


Link to post
Share on other sites
Do you have the parameters set/enabled?

Dirty Haz

wait what? do you mean the stuff inside description.ext?

I did merge that with mine....

Share this post


Link to post
Share on other sites

Hm, do you want me to have a look at it for you mate?

Dirty Haz

Share this post


Link to post
Share on other sites

2yzct3t.jpg

I get this error, can you tell me what I have done wrong ..?

Thanks in advance :)

Share this post


Link to post
Share on other sites

Have u downloaded the latest version? That looks like an earlier version.

Share this post


Link to post
Share on other sites

Now I have downloaded the new version, but now I get this error "Resource AiMenu not found" ?

I have set it up like this:

Quote Originally Posted by Dirty Haz View Post

You could use the add action option instead of the marker like I do.

Remove the marker and place down a object, in the object init add the following...

this addAction [("<t color=""#00C3FF"">" + ("Open AI Recruit Menu") +"</t>"), "FOCKRecruitAI\RecruitMenu.sqf",[],1,false,true];

Edited by MichaelDK

Share this post


Link to post
Share on other sites

Thanks, but I give up, I got the menu to work, but I can only be allowed to recrute one man, no matter how many I put it on in the parameters ..

I must have something that conflicts in description.ext, but thanks anyway :)

Share this post


Link to post
Share on other sites
send me a pm with your mission and ill check it for you

Mikie boy has found the error in my description.ext and now everything works as it should .. :)

Great script... and thanks!!

Share this post


Link to post
Share on other sites

I have an error showing when loading game can anyone assist with the script.

It says missing input parameter!

Im also running the BTC revive script I managed to get the map to run but still has above error not sure where or how to fix.

Respawn = 6;

RespawnDelay = 4;

disabledAI = 1;

RespawnDialog = 0;

class Header

{

gameType = COOP;

minPlayers = 1;

maxPlayers = 20;

};

#include "=BTC=_revive\=BTC=_respawn.h"

#include "VAS\menu.hpp"

class CfgFunctions

{

#include "VAS\cfgfunctions.hpp"

};

class RscPicture

{

type = CT_STATIC;

idc = -1;

style = 48;

colorBackground[] = {0, 0, 0, 0};

colorText[] = {1, 1, 1, 1};

font = "PuristaMedium"; //Typeface

sizeEx = 0;

};

class RscTitles

{

#include "=BTC=_Logistic\=BTC=_Lift\=BTC=_Hud.h"

};

class Params {

//paramarray 0

class EmptySpace

{

title="----[FOCK] AI Recruit Options------------------";

values[]={0,0};

texts[]={ "",""};

default = 0;

};

//

//paramarray 1

class FockMenuControl

{

title=" [FOCK] Group/Recruit Menu On/Off";

values[]={ 1,0 };

texts[]={ "Enabled","Disabled"};

default=1;

code = "";

};

//paramarray 2

class FockRecControl

{

title=" [FOCK] Recruit On/Off";

values[]={ 1,0 };

texts[]={ "Enabled","Disabled"};

default=1;

code = "";

};

//

//paramarray 3

class FockRecAmount

{

title=" [FOCK] Recruit AI Amount";

values[]={ 1,2,3,4,5,6,7,8,9,10 };

texts[]={ "1","2","3","4","5","6","7","8","9","10"};

default= 7;

code = "";

};

//paramarray 4

class FockDeleteAI

{

title=" [FOCK] Delete AI on Leaving Group";

values[]={ 0,1 };

texts[]={ "No","Yes"};

default= 1;

code = "";

};

//paramarray 5

class FockEmptyGrpDelete

{

title=" [FOCK] Delete Empty Groups";

values[]={ 0,1 };

texts[]={ "No","Yes"};

default= 1;

code = "";

};

};

#include "FOCKRecruitAI\RecruitMenu.hpp" //game settings for ingame GUI

The script itself is excellent.

Share this post


Link to post
Share on other sites

the description.ext looks ok to me - any more clue as to where the origin of the error is?

Share this post


Link to post
Share on other sites

Ive cleaned up a couple of errors but still have the missing input parameter not sure what it means. It has a Fx logo showing when the map first shows error. ill post on the BTC as well it may be in there script causing problem.

Thanks again for looking into this im new to all this spent hours looking for my error LOL.

Edited by BOSSMANSHEILD

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×