Jump to content

Working Missions System


RedBreath

Recommended Posts

im sure the guy who stole it from me could explain but since im here I can help. just put all those files in your mission folder epoch.altis just as he has them on github and make sure you edit your be filter so you don't get a kick from using execVM its in line 20 of you be scripts.txt

Link to comment
Share on other sites

use this for the treasure hunts. just use the same files as the guy who stole them posted on github and replace with these and you will have the treasure hunt missions also

put in missions just change the marker pos

_marker = createMarker ["Marker1",[20340.3,6569.2]];

_marker setMarkerType "mil_objective";

"Marker1" setMarkerText "Treasure Hunt";

"Marker1" setMarkerColor "ColorOrange";

_n1 = floor(random 7);

if (_n1 == 0) then

{

execVM "mission\crates\box1.sqf";

};

if (_n1 == 1) then

{

execVM "mission\crates\box2.sqf";

};

if (_n1 == 2) then

{

execVM "mission\crates\box3.sqf";

};

if (_n1 == 3) then

{

execVM "mission\crates\box4.sqf";

};

if (_n1 == 4) then

{

execVM "mission\crates\box5.sqf";

};

if (_n1 == 5) then

{

execVM "mission\crates\box6.sqf";

};

if (_n1 == 6) then

{

execVM "mission\crates\box7.sqf";

};

//CLEAN UP

sleep 1500;

deleteMarker "Marker1";

sleep 10;

execVM "mission\call_missions.sqf";

put in crates change loot around in each crate sqf

_centerpos = getmarkerpos "Marker1";

_aadis = [42,100,150] call BIS_fnc_selectRandom;

_aadir = random 360;

_aapos = [(_centerpos select 0) + sin(_aadir)*_aadis,(_centerpos select 1) + cos(_aadir)*_aadis];

_box1 = createVehicle ["Pelican_EPOCH", _aapos, [], 0, "NONE"];

//_box1 = createVehicle ["Pelican_EPOCH", [getMarkerPos "marker1" +15,0], [], 0, "NONE"];

clearWeaponCargoGlobal _box1;

clearMagazineCargoGlobal _box1;

_box1 addWeaponCargoGlobal ["LMG_Mk200_MRCO_F", 2];

_box1 addWeaponCargoGlobal ["arifle_MXM_RCO_pointer_snds_F", 2];

_box1 addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag_Tracer", 4];

_box1 addMagazineCargoGlobal ["200Rnd_65x39_cased_Box_Tracer", 4];

_box1 additemcargoGlobal ["NVG_EPOCH", 2];

_box1 additemcargoGlobal ["Rangefinder", 2];

_box1 additemcargoGlobal ["FirstAidKit", 3];

_box1 additemcargoGlobal ["optic_Arco", 1];

_box1 additemcargoGlobal ["ItemKiloHemp", 3];

_box1 additemcargoGlobal ["ItemRuby", 1];

_box1 additemcargoGlobal ["Pelt_EPOCH", 4];

_box1 additemcargoGlobal ["meatballs_epoch", 2];

_box1 additemcargoGlobal ["HeatPack", 3];

_box1 additemcargoGlobal ["ItemSodaOrangeSherbet", 2];

_box1 additemcargoGlobal ["optic_ACO_grn", 1];

_box1 additemcargoGlobal ["U_O_GhillieSuit", 1];

_box1 addbackpackcargoGlobal ["B_Carryall_cbr", 1];

sleep 1500;

deleteVehicle _box1;

and in txt in main mission directory

hint format["Keep an eye out on your map for treasure hunts. There's a gun case laying around within 150m of the marker filled with tons of loot!"];

sleep 900;

execVM "txt.sqf";

https://github.com/drsubo/mission

Link to comment
Share on other sites

hmm thank you i guess need a bit more explanation coz im pretty new to this. Specialy exact what files need to be edited and where exactly ....

easy way to do it is find your battleye files and find script.txt and go to line 20 and delete it then you can call scripts without being kicked. if your counting lines the first line is 0 so it will really be 21 lines down.
Link to comment
Share on other sites

also looks like he took vehicles out of my script befor he posted it due to the fact that its client side and vehicle would spawn at mission for every player, ill post it with vehicles working properly and only spawning once not for every player, in a little while for you guys

Link to comment
Share on other sites

since the missions on client side and so it the ai wont ai spawn everytime a new client logs in? that's why I originally didn't have the script like this? can anyone confirm. I have a work around if this is the case because that's how it works for vehicles if you add them client side, everytime someone logs in it executes init and spawns everything over again making multiples. If the same is for ai then I need to add this script to it. please let me know

Link to comment
Share on other sites

not for the treasure hunt one but the ai one yes that's the whole reason for having ai. its just that if ai is called client side I think it will spawn the ai every time a player joins so there will end up being a ton of ai if a few players join within a short amount of time

Link to comment
Share on other sites

OK to make it clear :

 

1) Take you files from Github as it stands and import it to MP mission PBO file

2) edit BC file script.txt find line 20 and delete it (coz of bec)  [my line 20 says this : 7 allowDamage !=player allowDamage true;vehicle player allowDamage true]

3) ?????

Link to comment
Share on other sites

OK to make it clear :

 

1) Take you files from Github as it stands and import it to MP mission PBO file

2) edit BC file script.txt find line 20 and delete it (coz of bec)  [my line 20 says this : 7 allowDamage !=player allowDamage true;vehicle player allowDamage true]

3) ?????

the line your looking for will have execVM in it try line below that
Link to comment
Share on other sites

not for the treasure hunt one but the ai one yes that's the whole reason for having ai. its just that if ai is called client side I think it will spawn the ai every time a player joins so there will end up being a ton of ai if a few players join within a short amount of time

they stole if of my server. its my mission, im working on a polished one they just stole it off my server when I was testing and still working on it. as of now I have vehicles spawning in right amount and ai spawning only once even with muntiple people joining. I figured out a work around that wont cause every player that joins to respawn the same stuff for the mission. I will put up later today when im done with it.
Link to comment
Share on other sites

w

 

the line your looking for will have execVM in it try line below that

 

 

I guess it is line 21 : 7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\""

 
 
but how to mod this line ??
Link to comment
Share on other sites

the thing I still need to know though is if a missions running and a new player joins server will they make more ai spawn at the current mission that's already going. Like your at mission kill half the ai then player joins will it make all the ai respawn plus the ones that are still there. because its all executed client side so im thinking that it will. if someone could please test this and see if double the ai spawn if someone else joins while mission is active it will help me decide if this script im adding is needed and will help me finish and release the polished finished version of the script these guys stole pre maturely.

Link to comment
Share on other sites

w

 

 

 

I guess it is line 21 : 7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\""

 

 

but how to mod this line ??

like I said easy way is just delete it or else you have to add !="execVM \the\path\to\folder thats causing error\"
Link to comment
Share on other sites

the thing I still need to know though is if a missions running and a new player joins server will they make more ai spawn at the current mission that's already going. Like your at mission kill half the ai then player joins will it make all the ai respawn plus the ones that are still there. because its all executed client side so im thinking that it will. if someone could please test this and see if double the ai spawn if someone else joins while mission is active it will help me decide if this script im adding is needed and will help me finish and release the polished finished version of the script these guys stole pre maturely.

 Yes more AI will spawn as soon as Awol releases support to edit the .DLL you can change cleanup and restrict AI that spawn :)

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
×
×
  • Create New...