HellBz

How to edit existing Trader-Objects/Traders - Import from SQF to 3den-Editor

Is this Usefull for You  

3 members have voted

  1. 1. Is this Usefull for You



6 posts in this topic

I search a long time and looking for many Ways to edit Traders or Objects from RAW-Exile.

I like to import all Objects in 3den-Editor and Move around or delete many of them or add new Stuff.

Finally i write this Code for Objects to import in 3den-Editor.

Here is the Objects Code:

You can run this Code Local in Debug-Console

private _objects = 
[

	/*
	Insert here Your Objects like:
	["Land_CarService_F", [14618.7,16877.4,18.7724], [[0.750538,-0.660827,0],[0,0,1]], [false, false]],
	["Land_cargo_addon02_V2_F", [14563.7,16776.6,19.4699], [[0.723738,-0.690074,0],[0,0,1]], [false, false]]
	*/

];
{
	_object = create3DENEntity ["Object", _x select 0, [0,0,0], true];
	_position_atl = ASLToATL ( _x select 1 );
	_object set3DENAttribute ["position", _position_atl ];
	_object setVectorDirAndUp ( _x select 2 );
	_pitch_bank = _object call BIS_fnc_getPitchBank;
	_dir = getDir _object;
	_object set3DENAttribute ["rotation", [_pitch_bank select 0, _pitch_bank select 1, _dir]];
  	_object set3DENAttribute ["allowDamage", _x select 3 ];
} forEach _objects;


For a3_dms Static Missions:

Spoiler

_objs = [
/*	
	["Land_City2_8m_F",[15977,16201.3,0],17.7273,[[0.304487,0.952517,0],[0,0,1]],false],
	["Land_City2_8m_F",[15913.4,16222.7,0],35.9091,[[0.586501,0.809948,0],[0,0,1]],false]
*/
];

{
	_object = create3DENEntity ["Object", _x select 0, [0,0,0], true];
	_object set3DENAttribute ["position", ( _x select 1 ) ];
	_object set3DENAttribute ["rotation", [_pitch_bank select 0, _pitch_bank select 1, ( _x select 2 ) ]];
  	_object set3DENAttribute ["allowDamage", _x select 4 ];
} forEach _objs;

 


I still working to add all Traders to 3den-Editor,

to be continued.

 

Stay Tuned, Have Fun

 

You HellBz



This was my First Code:
(Working, but after Saving, all Buildings rotated in one direction, because no direction will be saved)

...

{
	_object = create3DENEntity ["Object", _x select 0, [0,0,0], true];
	_object setPosASL (_x select 1);
	_object setVectorDirAndUp (_x select 2);
	_object enableSimulationGlobal ((_x select 3) select 0);
	_object allowDamage ((_x select 3) select 1);
	
} forEach _objects;


I searched around the Internet Arma3 Wiki, Armaholic, any Many Forums the best what i found was here.
Thanks an most of Credits, here i found a Solution and the missing little Code Snippets:

 

Edited by HellBz

Share this post


Link to post
Share on other sites
Advertisement

Yes i Looking Around Forums, iam not the best in ARMA3 Coding, but iam not Stealing.

That is the reason for my Credits. (I work on this from 22PM up to 4 AM, this dont let me Sleep..

And i also Look in the m3e_3den.pbo for helping Lines.

And @tinboye Nice  to meet You
And thanks for Moving my Thread and nice to meet You @kuplion

Edited by HellBz
  • Like 1

Share this post


Link to post
Share on other sites

The code that I posted, which was shared to me along time ago.

Spoiler

{
    private[ "_pitch", "_bank" ];
    _x params[ "_objType", "_pos", [ "_dir", 0 ], [ "_ATL", 0 ], [ "_enabled", 1 ], [ "_up", 0 ], [ "_codes", [] ] ];
    _pos = call compile _pos;
    if ( _ATL isEqualTo -100 ) then {
        _pos set[ 2, _ATL ];
        _pos = ASLToATL _pos;
    };
    collect3DENHistory{
        _obj = create3DENEntity [ "Object", _objType, _pos, true ];
        if ( _up isEqualTo 0 ) then {
            _pitch = 0;
            _bank = 0;
        }else{
            _obj setVectorUp surfaceNormal getPosATLVisual _obj;
            _PB = _obj call BIS_fnc_getPitchBank;
            _pitch = _PB select 0;
            _bank = _PB select 1;
        };
        _obj set3DENAttribute [ "rotation", [ _pitch, _bank, _dir ] ];
        _obj set3DENAttribute [ "enableSimulation", _enabled isEqualTo 1 ];
        _obj set3DENAttribute [ "Init", format[ "{ call _x }foreach %1", _codes ] ];
    };
}forEach[
["Land_nav_pier_m_F","[16345.484375,12753.331055,-4.28872]",8.34599,-3.07901,1,0,[]]
];

 

This is the other import I use which works well, usually only have to make minor adjustments.

Spoiler

collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [  
    ["Exile_Sign_TraderCity",[12205.7,12597.3,3.975],202.663,0,0,false],
    ["Exile_Sign_TraderCity",[12139.4,12604.7,0],20.144,0,0,false], 
    ["Exile_Sign_Aircraft",[12190.6,12601.6,9.419],292.639,0,0,false],    
    ["Exile_Sign_AircraftCustoms",[12155.8,12609.4,0],201.982,0,0,false],    
    ["Land_Camping_Light_F",[12189.8,12598.8,10.114],0,0,0,false],    
    ["CargoNet_01_barrels_F",[12161.4,12608.2,0],200.092,0,0,false],
    ["Land_ToolTrolley_01_F",[12159.5,12608.6,0],289.7,0,0,false],
    ["Land_Canister_EP1",[12157.2,12609.3,0],294.311,0,0,false],
    ["Land_Canister_EP1",[12156.5,12609.5,0],0,0,0,false],
    ["Barrel1",[12154.6,12610.4,0],0,0,0,false],
    ["Land_fort_bagfence_round",[12138.6,12602.4,0],197.399,0,0,false],
    ["Land_Wreck_Heli_Attack_02_F",[12173,12588.9,0],0,0,0,false],
    ["Land_HelipadCircle_F",[12168.4,12638,0],19,0,0,false],
    ["Land_HelipadSquare_F",[12205,12625.7,0],19,0,0,false]
	];
	};

 

similar in ways, but not the same. I get alot of references from https://foxhound.international/arma-3-eden-scripting.html

Share this post


Link to post
Share on other sites

how to import:
 

private _simpleObjects = [
["a3\structures_f_heli\furniture\officechair_01_f.p3d", [7409.96, 8075.54, 169.927], [-0.849555, -0.527426, 0.00880506], [0.00639417, 0.00639427, 0.999959]],

?

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

  • Recently Browsing   0 members

    No registered users viewing this page.