Jump to content
  • 0

0.3.0.1 Baked into Epoch AI Missions


DirtySanchez

Question

Well now, its been about a week of 0.3's public release and again no posts regarding this one.

So now everyone has seen the array of Epoch Events in their epochconfig.hpp file.

And I hope everyone has looked into their new epoch_server_settings.pbo file, which now holds an EpochEvents folder.

 

Yep that's right, add an event into that folder and add the filename to the events array giving it a respawn time and voila!

 

You now have your own events/missions baked right into epoch.

So far I have tested a Hunter Mission with random placed objects and 5 Epoch Based AI infantry.

 

I am going to keep it as is but add a line of code for a random vehicle spawn to keep the vehicle count balanced evenly.

 

There is much much more potential here, if you are like me and just like to tinker, check out the main 4 events and you can grasp what they are about. Screw around with a little code and I am sure you will get what you are looking for.

 

Thanks Devs for this update and all these options, we really really needed this!

 

Just a quick dirty (LOL) example

Add a new array for the "Hunter" event and give it a respawn time, then 

Save this code as hunter.sqf in your epoch_server_settings.pbo epochevents folder

_hunterPosition = [epoch_centerMarkerPosition, 0, EPOCH_dynamicVehicleArea, 10, 0, 4000, 0] call BIS_fnc_findSafePos;
if ((count _hunterPosition) == 2) then{
		_item = createVehicle["B_MRAP_01_EPOCH", _hunterPosition, [], 0.0, "CAN_COLLIDE"];
		_item setDamage 0.8;
		_item setFuel 2;
		_item setVariable["LASTLOGOUT_EPOCH",1000000000000];
		_item setVariable["LAST_CHECK",1000000000000];
			//So Vehicle doesnt despawn
		EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
		EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
		_slot = EPOCH_VehicleSlots select 0;
		_item setVariable ['VEHICLE_SLOT',_slot,true];
		EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
		EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
		publicVariable 'EPOCH_VehicleSlotCount';
		_item call EPOCH_server_setVToken;
			//Creates vehicle inventory
		clearWeaponCargoGlobal    _item;
		clearMagazineCargoGlobal  _item;
		clearBackpackCargoGlobal  _item;
		clearItemCargoGlobal       _item;
			//Static Position Objects
		_item = createVehicle["Land_Cargo_Patrol_V1_F", _hunterPosition, [],20, "NONE"];
		_group = createGroup RESISTANCE;
		_group createUnit ["I_Soldier_EPOCH", _hunterPosition, [], 10, 'NO_COLLIDE'];
		_group createUnit ["I_Soldier_EPOCH", _hunterPosition, [], 10, 'NO_COLLIDE'];
		_group createUnit ["I_Soldier_EPOCH", _hunterPosition, [], 10, 'NO_COLLIDE'];
		_group createUnit ["I_Soldier_EPOCH", _hunterPosition, [], 10, 'NO_COLLIDE'];
		_group createUnit ["I_Soldier_EPOCH", _hunterPosition, [], 10, 'NO_COLLIDE'];
	sleep 0.1;
	{
			//Random Position Objects based on distance in array
		_item = createVehicle[_x, _hunterPosition, [], 50, "NONE"];
		sleep 1;
	} forEach["Land_Wreck_Heli_Attack_02_F", "Land_Wreck_Heli_Attack_02_F"];

	if (EPOCH_showShippingContainers) then{
		_marker = createMarker[str(_hunterPosition), _hunterPosition];
		_marker setMarkerShape "ICON";
		_marker setMarkerType "mil_dot";
		_marker setMarkerText "Hunter";
		_marker setMarkerColor "ColorRED";
	};
};
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

whats exactly is the point of using a vehicle slot if you arent saving the vehicle to the database anyway?

you are also adding an unusable vehicle slot to the back of the array and then removing the first, this will defo fuck up some stuff and eventually end up with the server deleting vehicles unintended.

 

also, you should give the ai waypoints or you risk them running away from the mission, not to mention these ai is not cleaned up when they die or the mission is complete.

Link to comment
Share on other sites

  • 0

Halv, lately your replies to people have been pretty weird, sort of attacking usually.

I'm not sure what's going on with ya.....

Look at the date of OP.

April 2nd, 2015.

Look at the release dates of Epoch.

Look at the changelog of Epoch.

At this point you should gather that epoch at 0.3.0.1 opened up a slew of new ways to edit and configure epoch.

Including the first time that the built in epoch mission s were added to the server files and open to be added to and edited.

At that point I made about 3 or 4 posts concerning the new stuff that could be edited and made simple examples for people to use. I was learning and they were learning.

The other post that caused you to come over here, everyone was asking and trying to learn, a simple question about how to do something was asked and a few people tried to help the best they can. I remembered this post I made and the code was in it that answered the guys question in complete.

Link to comment
Share on other sites

  • 0

if telling you what is wrong with your script is attacking you, then i dont really care tbh ... i cant be checking the pulse on everyones mood, before i write in a topic.

pointing out flaws/problems in a script is not an act of agression towards the creator, quite contrary.

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