Jump to content
  • 0

AI Recruit


Hux

Question

2 answers to this question

Recommended Posts

  • 0

I'm trying to install Bon's Recruit once again.

I couldn't get it to work using an sqf script to spawn flag.

The intructions:

Spoiler

Installation:

The installation procedure remains identical to the original version.

Place the folder "bon_recruit_units" in your root mission folder.

For the "init.sqf", place the following line to initialize the server and client scripts:

[] execVM "bon_recruit_units\init.sqf";

For the "description.ext", place the following lines for the recruitment GUI.

#include "bon_recruit_units\dialog\common.hpp"
#include "bon_recruit_units\dialog\recruitment.hpp"

In an object's initialization field (such as a flag), add:

this addAction["<t color='#ff9900'>Recruit Infantry</t>", "bon_recruit_units\open_dialog.sqf"];

Now I'm trying to install it using mission.sqm.

Here is the code in example mission:

Spoiler


class Vehicles
    {
        items=1;
        class Item0
        {
            position[]={11905.002,10.926805,13041.153};
            azimut=20.344;
            id=5;
            side="EMPTY";
            vehicle="Flag_BI_F";
            leader=1;
            skill=0.60000002;
            init="this addAction[""<t color='#ff9900'>Recruit Infantry</t>"", ""bon_recruit_units\open_dialog.sqf""];";
        };
    };
};

Here is the code I got using editor:

Spoiler

class Item1
        {
            dataType="Object";
            class PositionInfo
            {
                position[]={11905.002,10.926805,13041.153};
            };
            side="Empty";
            flags=5;
            class Attributes
            {
                init="this addAction[""<t color='#ff9900'>Recruit Infantry</t>"", ""bon_recruit_units\open_dialog.sqf""];";
            };
            id=2;
            type="Flag_BI_F";
        };
    };
};

Neither one worked for me.

Would someone please help me install this?

 

Thank you.

Link to comment
Share on other sites

  • 0

Ok, I finally managed to install Bon's Infantry Recruit.

In case anyone else is interested to know, I'm posting the end of my mission.sqm.

I added a flag with the addaction to recruit AI by using the editor and adding the code to the bottom of my mission.sqm.

Spoiler

class Item102
        {
            dataType="Group";
            side="Civilian";
            class Entities
            {
                items=1;
                class Item0
                {
                    dataType="Object";
                    class PositionInfo
                    {
                        position[]={9969.2129,298.72415,12166.665};
                        angles[]={0,4.7169838,0};
                    };
                    side="Civilian";
                    flags=7;
                    class Attributes
                    {
                        isPlayable=1;
                    };
                    id=202;
                    type="VirtualMan_EPOCH";
                };
            };
            class Attributes
            {
            };
            id=201;
        };
        class Item103
        {
            dataType="Marker";
            position[]={9958.0127,10461.262,12858.563};
            name="north";
            type="Empty";
            id=2;
            atlOffset=10359.609;
        };
        class Item104
        {
            dataType="Object";
            class PositionInfo
            {
            position[]={11905.002,10.926805,13041.153};
            };
            side="Empty";
            flags=5;
            class Attributes
            {
            init="this addAction[""<t color='#ff9900'>Recruit Infantry</t>"", ""bon_recruit_units\open_dialog.sqf""];";
            };
            id=2;
            type="Flag_BI_F";
        };
    };
};

Remember to change the item number at top of file to items=105;

It's a fun script to use so I hope this helps others.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...