Sign in to follow this  
Followers 0
NeverAgain

DMS add object to mission

9 posts in this topic

Hi please how to add this to dms?

[
	["C130J_wreck_EP1",[-3.27368,-4.38623,4.76837e-007],0],
	["AmmoCrates_NoInteractive_Large",[-2.42261,5.78418,-0.816357],0],
	["CUP_hromada_beden_dekorativniX",[-2.36035,9.07129,-0.696035],0],
	["Land_PaperBox_open_full_F",[2.552,-2.00781,0],0],
	["Land_PaperBox_open_empty_F",[1.5603,0.310547,0],0],
	["Land_PaperBox_open_full_F",[-6.8811,-2.41992,0],0],
	["Land_Pallet_MilBoxes_F",[-7.67676,1.13379,0],0],
	["Box_CSAT_Uniforms_F",[-6.7605,-0.541504,0],201.116],
	["Box_AAF_Uniforms_F",[3.41797,-0.694336,0],103.27],
	["O_supplyCrate_F",[-8.33032,-1.38086,4.86374e-005],283.184],
	["Land_CargoBox_V1_F",[1.80908,2.62109,0],0],
	["CUP_misc_BurnSpruce_PMC",[28.2466,-17.7163,-4.76837e-007],0]
]

how to get this:

 Dms objects code:
  Hide contents

[
    ["Land_Cargo_House_V2_F",[0,15,0],0],
    ["Land_Cargo_House_V2_F",[6.2,15,0],0],
    ["Land_Cargo_House_V2_F",[-6.2,15,0],0],
    ["Land_Cargo_House_V2_F",[15,0,0],90],
    ["Land_Cargo_House_V2_F",[15,6.2,0],90],
    ["Land_Cargo_House_V2_F",[15,-6.2,0],90],
    ["Land_Cargo_House_V2_F",[0,-15,0],180],
    ["Land_Cargo_House_V2_F",[-6.2,-15,0],180],
    ["Land_Cargo_House_V2_F",[6.2,-15,0],180],
    ["Land_Cargo_House_V2_F",[-15,0,0],270],
    ["Land_Cargo_House_V2_F",[-15,-6.2,0],270],
    ["Land_Cargo_House_V2_F",[-15,6.2,0],270]
]

 

Share this post


Link to post
Share on other sites
On ‎26‎/‎10‎/‎2017 at 9:30 AM, NeverAgain said:

Hi please how to add this to dms?


[
	["C130J_wreck_EP1",[-3.27368,-4.38623,4.76837e-007],0],
	["AmmoCrates_NoInteractive_Large",[-2.42261,5.78418,-0.816357],0],
	["CUP_hromada_beden_dekorativniX",[-2.36035,9.07129,-0.696035],0],
	["Land_PaperBox_open_full_F",[2.552,-2.00781,0],0],
	["Land_PaperBox_open_empty_F",[1.5603,0.310547,0],0],
	["Land_PaperBox_open_full_F",[-6.8811,-2.41992,0],0],
	["Land_Pallet_MilBoxes_F",[-7.67676,1.13379,0],0],
	["Box_CSAT_Uniforms_F",[-6.7605,-0.541504,0],201.116],
	["Box_AAF_Uniforms_F",[3.41797,-0.694336,0],103.27],
	["O_supplyCrate_F",[-8.33032,-1.38086,4.86374e-005],283.184],
	["Land_CargoBox_V1_F",[1.80908,2.62109,0],0],
	["CUP_misc_BurnSpruce_PMC",[28.2466,-17.7163,-4.76837e-007],0]
]

how to get this:


 Dms objects code:
  Hide contents

[
    ["Land_Cargo_House_V2_F",[0,15,0],0],
    ["Land_Cargo_House_V2_F",[6.2,15,0],0],
    ["Land_Cargo_House_V2_F",[-6.2,15,0],0],
    ["Land_Cargo_House_V2_F",[15,0,0],90],
    ["Land_Cargo_House_V2_F",[15,6.2,0],90],
    ["Land_Cargo_House_V2_F",[15,-6.2,0],90],
    ["Land_Cargo_House_V2_F",[0,-15,0],180],
    ["Land_Cargo_House_V2_F",[-6.2,-15,0],180],
    ["Land_Cargo_House_V2_F",[6.2,-15,0],180],
    ["Land_Cargo_House_V2_F",[-15,0,0],270],
    ["Land_Cargo_House_V2_F",[-15,-6.2,0],270],
    ["Land_Cargo_House_V2_F",[-15,6.2,0],270]
]

 

I found it easiest to use the M3Editor and export as SQF, if you have coded in eden then you can start the mission and use the following code in the server run box to import it into M3editor automatically:

Spoiler

 {
_dir = getdir _x;
_object setVariable ['M3E_dir', _dir, true];
_object setVariable ['M3E_pitch', 0, true];
_object setVariable ['M3E_bank', 0, true];
_object setVariable ['M3E_followterrain', false, true];
_object setVariable ['M3E_position', position _x, true];
M3E_insertedObjects pushBack _x;
}
forEach allMissionObjects "All";
call M3E_fnc_loadSpawnedList;

the way to  get the relative positions is pretty easy but takes maths:

1. I always build missions on flat ground like salty flats or desert.

2. I always put a flag in the centre of the mission before I start and try to make it have nice coordinates (round whole numbers like 1000,500,0 )

3. drop in your items using the flag as the missions centre point.

4. Export using M3editor into SQF

5. Remove top and bottom of file

6. using the centre coordinates just subtract them in turn X-X y-y Z-Z and you should end up with small numbers like +10,-5,0 etc and those are then relative to the centre of the mission and can be used for bandit missions.

I did do a thread about my first goes at missions and did put it all in there and the mapping was the only really fiddly bit of bandit missions

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
38 minutes ago, red_ned said:

I found it easiest to use the M3Editor and export as SQF, if you have coded in eden then you can start the mission and use the following code in the server run box to import it into M3editor automatically:

  Hide contents

 

 

deleted

Edited by NeverAgain

Share this post


Link to post
Share on other sites
16 minutes ago, NeverAgain said:

video tutorial would be useful

if I made a video you would just hear me swearing a lot, instead I did add a screenshot/text tutorial while I was learning of things I tried, its as good a starting place as any:

 

1 person likes this

Share this post


Link to post
Share on other sites

@red_ned Good to see you back :)

Just wondering if you knew a way to put a static gun on top of an object in a bandit mission?

I know how to spawn it randomly, but cant get it on top of a building in a bandit mission.

Here is the DMS spawn static MG position call:

Spoiler

    private _gun = createVehicle [_MGClass, [0,0,0], [], 0, "CAN_COLLIDE"];
    _gun setDir (random 360);
    _gun setPosATL _x;
    _gun lock 2;

cheers

Share this post


Link to post
Share on other sites
17 hours ago, aussie battler said:

@red_ned Good to see you back :)

Just wondering if you knew a way to put a static gun on top of an object in a bandit mission?

I know how to spawn it randomly, but cant get it on top of a building in a bandit mission.

Here is the DMS spawn static MG position call:

  Reveal hidden contents

    private _gun = createVehicle [_MGClass, [0,0,0], [], 0, "CAN_COLLIDE"];
    _gun setDir (random 360);
    _gun setPosATL _x;
    _gun lock 2;

cheers

I think, but would need to test (I did it a while back), it should be as simple as when you do the mapping of the object underneath the gun placing a gun on top to see height so it ends up looking like this:

Spoiler

// add static guns
_staticGuns =
[
 [
  // make statically positioned relative to centre point, keep static as they are on top of building
  [(_pos select 0)+7,(_pos select 1)+3,(_pos select 2)+3.11146],
  [(_pos select 0)+7,(_pos select 1)+4,(_pos select 2)+3.11146]
 ],
 _group,
 "assault",
 "static",
 "bandit"
] call DMS_fnc_SpawnAIStaticMG;

<BUT>

 

don't do what I did and load mapping after the m2 spawns in so move this section above the AI call: (_group =)

Spoiler

// Create Buildings - use seperate file as found in the mercbase mission
_baseObjs =
[
 "nedresearch_objects",
 _pos
] call DMS_fnc_ImportFromM3E;

as long as the object is in place before the gun spawns it should retain its height (I add 0.01 to height to make sure, any more and physics drops the gun and it can fall off).

let me know how it goes as I am just a little rusty as I get back into everything

2 people like this

Share this post


Link to post
Share on other sites

@red_ned you are a legend. I never thought about the static guns loading in mid air & then taking a dive because the building hadn't loaded in.

Thanks for your help :)

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.