Jump to content

AI MISSIONS (have em)


machine6fd

Recommended Posts

hey guys,

 

 

I have added server side missions to my server. this is a Frankenstein of all the ones that have been posted on these forums. i don't take credit and i wont be helping anyone with issues. I've spent a few days trying to make them work and they are working.... please know that the code is sloppy... lol spent a few late nights full of coffee getting this working. there are and will be much better AI out there for you infact i think the one on the the actual AI forum looks pretty promising. But anyway thought i would share what i got working.

 

https://www.dropbox.com/s/sslmty5tfdc3drd/a3_missionsPlus_server.pbo?dl=0

this will go in your @EpochHive\Addons folder.

 

You will need to add this to you mission.pbo init file. so people can see the mission hint. 

"GlobalHint" addPublicVariableEventHandler
{
                private ["_ogjstr"];
                _ogjstr = _this select 1;
                hint parseText format["%1", _ogjstr];
};

again... I take no credit for any of the code. I also wont be helping with support. unless minor issues. If you have battle eye kicks search the forums there are ways to fix them yourself.

 

gl hf 

 

*uploaded file with

_unit1 setVariable [ "LASTLOGOUT_EPOCH" , diag_tickTime + 1500 ];   /// = 25min delete 

corrected.

Link to comment
Share on other sites

make one in your mission pbo

ME FILES

 

["Check your map, There some dbags lurking around","BIS_fnc_log"] call BIS_fnc_MP;

                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                //Mission BEGUN message

                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                _ogjstr = "<t align='center' size='2.0'>EPOCH Side Missions<br/>Find the IKEA Box</t><br/>______________<br/><br/>

                <br/>We dropped IKEA BOX for survivors, but mad scientists group secured the location.<br/>

                You have our permission eliminate the threat and confiscate any property you find as payment for your trouble!";

                GlobalHint = _ogjstr;

                publicVariable "GlobalHint";

                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

_marker = createMarker ["Marker1",[9807.3,8707.2]];

_marker setMarkerType "mil_warning";

"Marker1" setMarkerText "IKEA";

"Marker1" setMarkerColor "ColorRed";

    _centerpos = getmarkerpos "Marker1";

    _unitGroup = createGroup RESISTANCE;

    _unitGroup setBehaviour "AWARE";

    _unitGroup setCombatMode "RED";

    for "_i" from 1 to 7 do

    {

            _unit = _unitGroup createUnit ["I_Soldier_EPOCH", _centerpos, [], 0, "FORM"];

            //_unit setVariable [ "LASTLOGOUT_EPOCH" , 1060 ];

            _unit setVariable [ "LASTLOGOUT_EPOCH" , diag_tickTime + 1050 ];

            //_unit setVariable ["LASTLOGOUT_EPOCH" , diag_tickTime + 180];

            _unit setSkill 0.6;

            _unit setRank "Private";

            _unit enableAI "TARGET";

            _unit enableAI "AUTOTARGET";

            _unit enableAI "MOVE";

            _unit enableAI "ANIM";

            _unit enableAI "FSM";

    };

[]execVM "serverscripte\epoch\mission\crates\box1.sqf";

 

sleep 1000;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Mission COMPLETED message

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

_ogjstr = "<t align='center' size='2.0'>EPOCH Missions</t><br/>

______________<br/><br/>

Mission accomplished survivors!<br/>

next mission starts in <br/>

16 minutes.";

GlobalHint = _ogjstr;

publicVariable "GlobalHint";

sleep 60;

deleteMarker "Marker1";

sleep 10;

[]execVM "serverscripte\epoch\mission\call_missions.sqf";

 

Link to comment
Share on other sites

Having the same issue as others with players taking no damage.  Has to be some way to set the server as the owner of the AI units when they are spawned in.  

 

Headless client. There might be someway to add a script to find the ai units and tie them to the nearest client... When testing I had more than one player so didn't notice the extent of the issue. Honestly I think digging into it too much would be a waste of time as the other AI mission system will be a whole lot better and with more functionality.

Link to comment
Share on other sites

Lol good attempt. Almost got it all working. Damage is the tricky part because of the load player.sqf in the epoch server side pbo. I'd start looking around there to figure out how to bypass the AllowDamage= false from ai; for players loading into the server from restarts. ;]

Link to comment
Share on other sites

Headless client. There might be someway to add a script to find the ai units and tie them to the nearest client... When testing I had more than one player so didn't notice the extent of the issue. Honestly I think digging into it too much would be a waste of time as the other AI mission system will be a whole lot better and with more functionality.

 

I had the same thought with the HC.  But the HC tutorial on the forums here is for incorporating an HC with AI whose files are stored in the mission.  Since the package that you posted runs server side I don't know that the HC would be effective in that case.  Honestly I can't even test that theory at this point since I keep getting BE kicked when using HCs on my test server.  So until I get that fixed I won't know for sure.  

Link to comment
Share on other sites

Looking at the new VEMF system that is being worked on he is making the AI basically sit idle and when a player is near they become attached to that player. Far as i can tell this is being done server side with no mission.pbo scripts perhaps he can shed more light on the idea but this is what i see in his code so far. _owner = owner ((_pos nearEntities [["Epoch_Male_F", "Epoch_Female_F"], 800]) select 0); 

Link to comment
Share on other sites

You can add _ailist to public variables and define it there. Then all you need to do find out how exempt the array you set in the ailist from being cleaned up from the doppleganger code in the vehiclesimulation.fsm. Which is where all the AI problems come from.

Alas with the new patch coming out and being as it removes that code completely which save you lot all a headache, I'd just hold off until patch day to pursue this. It was an annoyance getting it working the way I wanted..this new patch will make a lot of scripts much easier to execute.

Link to comment
Share on other sites

Alas with the new patch coming out and being as it removes that code completely which save you lot all a headache, I'd just hold off until patch day to pursue this. It was an annoyance getting it working the way I wanted..this new patch will make a lot of scripts much easier to execute.

 

 

You mean the new patch will feature different cleanup code that should allow AI to spawn and stay?  Am I reading you right? If so that would be huge!  lol

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...