Register

DonkeyPunch Community Gaming

GAME ON!!! -sTanG

News:

eXpoch Beta is almost finished. Inquire within here, ts3 or discord for access to the mod and the private forums to help develop the mod for public release.
Administrator
*****

DirtySanchez

December 17, 2016, 11:27:03 AM
Humanitarian Posts: 932 Humanity: +1337/-420
I know alot of you have used many ways of building and getting our objects on the map.
Many of us are experiencing an issue trying to use these old objects again without the ability to modify them.

Well not anymore.
Now we must understand that just about every script that spawns in these objects is different in some way shape or form. So I will give us 2 examples and show you what we need to have.

This is the current export from exile3den plugin
Code: [Select]
["Exile_Sign_SpecialOperations_Small",[4014.58,11637.6,361.212],[[0.916919,-0.399074,0],[0,0,1]],[false,false]]
This is the old m3editor export
Code: [Select]
["Land_CncWall4_F",[9637.09,11319.1,0],131.284,[[0.751449,-0.659791,0],[0,-0,1]],false]
Unfortunately the exile 3den plugin does not save rotation and the 3den editor does not have a vector dir and up setting in the attributes, only rotation. And yes there is X,Y, Z for Pitch Yaw and Roll but they are degrees and even when converted from vector direction, do not set the object properly.

So now we understand what is necessary in order to convert them into 3DEN. (ROTATION from getDir)

We see the old m3editor did save rotation and it gives us the opportunity to port em into 3den!

On all of these map scripts there is a block of code that usually looks like this
Code: [Select]
{
private _object = (_x select 0) createVehicle [0,0,0];
_object setPosASL (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object enableSimulationGlobal ((_x select 3) select 0);
_object allowDamage ((_x select 3) select 1);
_object setVariable ["ExileIsLocked", -1, true];
} forEach _objects;

This code needs to be replaced with:
Code: [Select]
{
 private ["_obj"];
 _obj = create3DENEntity ["Object",(_x select 0),(_x select 1)];   
 _obj set3DENAttribute ["rotation",[0, 0, (_x select 2)]];
} foreach _objs;

Once that is done, go ahead and get in the 3den editor and use the debug console LOCAL EXEC to spawn in your old map objects.
Notice now that the objects have populated the Entity List on the Left :)
Just export appropriately and VOILA your old ready to rock and roll on the new editor!

GAME ON!!!!

-sTanG


Website: http://DonkeyPunch.INFO  |  Discord: https://discord.me/eXpoch  |  TeamSpeak: ts3.donkeypunch.info


 

Facebook Comments

1337-420