Jump to content
  • 0

DZMS Mission customization help.


oSoDirty

Question

I was wondering if anyone knew of a way to make a specific mission call for the static array or just a fixed location while the rest remain random. I ask because i have customized a C130 mission to be secured and sold or whatever the player desires to do with it. But if is spawning in random locations takeoff probability its minimal. If not can i change and what do i need to change in the files to rename a second DZMS folder to work alone as a separate mission system and not cause problems between the 2?

 

 

In case its needed or if someone just wants to use it -

/*
	Bandit C130 Preparation by oSoDirty credit to lazyink for template i used (Full credit for original code to TheSzerdi & TAW_Tonic)
	New Mission Format by Vampire
*/

private ["_missName","_coords","_ranChopper","_chopper","_truck","_trash","_trash2","_crate","_crate2"];

//Name of the Mission
_missName = "C130";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;

[nil,nil,rTitleText,"Bandits are preparing a C130 for take off Take them out and its yours!", "PLAIN",10] call RE;

//DZMSAddMajMarker is a simple script that adds a marker to the location
[_coords,_missname] ExecVM DZMSAddMajMarker;

_truck = createVehicle ["C130J_US_EP1",[(_coords select 0) - 8.7802,(_coords select 1) + 6.874,0],[], 0, "CAN_COLLIDE"];
[_truck] call DZMSSetupVehicle;

//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[(_coords select 0) - 8.4614,(_coords select 1) - 5.0527,0],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;

//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;

//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_chopper] ExecVM DZMSSaveVeh;
[_truck] ExecVM DZMSSaveVeh;

//Let everyone know the mission is over
[nil,nil,rTitleText,"The C130 has been Taken by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM4 Helicopter Landing Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";

//Let the timer know the mission is over
DZMSMajDone = true;

ANY help would be greatly appreciated!!! 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

You can specify exact locations for everything in the mission. For example:

_truck = createVehicle ["C130J_US_EP1",[(_coords select 0) - 8.7802,(_coords select 1) + 6.874,0],[], 0, "CAN_COLLIDE"];

Replace with:

_truck = createVehicle ["C130J_US_EP1",[2697.8979, 5607.0571, 1],[], 0, "CAN_COLLIDE"];

Do that for everything that has a "_coords select". 

Link to comment
Share on other sites

  • 0

You can specify exact locations for everything in the mission. For example:

_truck = createVehicle ["C130J_US_EP1",[(_coords select 0) - 8.7802,(_coords select 1) + 6.874,0],[], 0, "CAN_COLLIDE"];

Replace with:

_truck = createVehicle ["C130J_US_EP1",[2697.8979, 5607.0571, 1],[], 0, "CAN_COLLIDE"];

Do that for everything that has a "_coords select". 

 

 

 

Cool, trying it now! Thanks  :)

Link to comment
Share on other sites

  • 0

Post the mission you created with the static points.

/*
	Bandit C130 Preparation by oSoDirty credit to lazyink for template i used (Full credit for original code to TheSzerdi & TAW_Tonic)
	New Mission Format by Vampire
*/

private ["_missName","_coords","_ranChopper","_chopper","_truck","_trash","_trash2","_crate","_crate2"];

//Name of the Mission
_missName = "C130";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result

[nil,nil,rTitleText,"Bandits are preparing a C130 for take off Take them out and its yours!", "PLAIN",10] call RE;

//DZMSAddMajMarker is a simple script that adds a marker to the location
[4830.6,9760.73,0.01],_missname] ExecVM DZMSAddMajMarker;

_truck = createVehicle ["C130J_US_EP1",[4830.6,9760.73,0.01],[], 0, "CAN_COLLIDE"];
[_truck] call DZMSSetupVehicle;

//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[4830.6,9760.73112,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[4830.6,9760.73113,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;

//Wait until the player is within 30 meters and also meets the kill req
[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;

//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_chopper] ExecVM DZMSSaveVeh;
[_truck] ExecVM DZMSSaveVeh;

//Let everyone know the mission is over
[nil,nil,rTitleText,"The C130 has been Taken by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM4 Helicopter Landing Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";

//Let the timer know the mission is over
DZMSMajDone = true;

Im waiting now to see if it works. i had some extra brackets on the AI spawn part before.

Link to comment
Share on other sites

  • 0

This line:

[4830.6,9760.73,0.01],_missname] ExecVM DZMSAddMajMarker;

Change it to this (Added the extra bracket at the begining):

[[4830.6,9760.73,0.01],_missname] ExecVM DZMSAddMajMarker;

Change this:

[4830.6,9760.73112,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[4830.6,9760.73113,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;

To this:

[[4830.6,9760.73112,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[4830.6,9760.73113,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;

You also have to change this line:

[_coords,"DZMSUnitsMajor"] call DZMSWaitMissionComp;

To this:

[[4830.6,9760.73,0.01],"DZMSUnitsMajor"] call DZMSWaitMissionComp;

You need to have the coordinates inside the [].

Link to comment
Share on other sites

  • 0

WOW, works like a charm!! Thanks a lot for your time and efforts in helping me sort this out!

 

 

 

For anyone with DZMS who cares to use it just make a file called SM7.sqf with notepad++ or something like it and copy and paste this inside.

/*
	Bandit C130 Preparation by oSoDirty credit BetterThanZed for helping me understand the script & to lazyink for his mission i used as a template (Full credit for original code to TheSzerdi & TAW_Tonic)
	New Mission Format by Vampire
*/

private ["_missName","_coords","_ranChopper","_chopper","_truck","_trash","_trash2","_crate","_crate2"];

//Name of the Mission
_missName = "C130";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result

[nil,nil,rTitleText,"Bandits are preparing a C130 for take off Take them out and its yours!", "PLAIN",10] call RE;

//DZMSAddMajMarker is a simple script that adds a marker to the location
[[4830.6,9760.73,0.01],_missname] ExecVM DZMSAddMajMarker;

_truck = createVehicle ["C130J_US_EP1",[4830.6,9760.73,0.01],[], 0, "CAN_COLLIDE"];
[_truck] call DZMSSetupVehicle;

//DZMSAISpawn spawns AI to the mission.
//Usage: [_coords, count, skillLevel, unitArray]
[[4830.6,9760.73112,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;
[[4830.6,9760.73113,0.01],5,1,"DZMSUnitsMajor"] call DZMSAISpawn;
sleep 5;

//Wait until the player is within 30 meters and also meets the kill req
[[4830.6,9760.73,0.01],"DZMSUnitsMajor"] call DZMSWaitMissionComp;

//Call DZMSSaveVeh to attempt to save the vehicles to the database
//If saving is off, the script will exit.
[_chopper] ExecVM DZMSSaveVeh;
[_truck] ExecVM DZMSSaveVeh;

//Let everyone know the mission is over
[nil,nil,rTitleText,"The C130 has been Taken by Survivors!", "PLAIN",6] call RE;
diag_log text format["[DZMS]: Major SM4 Helicopter Landing Mission has Ended."];
deleteMarker "DZMSMajMarker";
deleteMarker "DZMSMajDot";

//Let the timer know the mission is over
DZMSMajDone = true;

 Then save it and place it inside DZMS\Missions\Major.

 

Then in your  DZMSConfig.sqf   

 

Change

DZMSMajorArray = ["SM1","SM2","SM3","SM4","SM5","SM6"];

To this

DZMSMajorArray = ["SM1","SM2","SM3","SM4","SM5","SM6","SM7"];

If yours looks different just add the "SM7" in the DZMSMajorArray.

 

Repack and upload the PBO and enjoy.

 

This will spawn 10 AI protecting a C130 at NWAF to take and sell fly into a base or whatever your heart desires  :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...