Jump to content
SSG-Levi

LPD-29 mod interaction with the Eden editor

Recommended Posts

Hi, 

I was trying to implement the LPD-29 static ship mod which was created for ARMA2 in a training mission I'm creating. 

While this mod "works" in ARMA3, it has a little bug. 

When the ship is placed in the 3d editor at a certain point, it actually spawns ~50m west of its original position - when previewing the mission (causing the helicopters on the landing deck to spawn in the middle of the ship- as it can only be oriented from west to east).

Then, when getting back to the editor, the ship is located at its new location and when previewing again it jumps another 50m west and so on...

 

anyone have any suggestion or experience with this kind of behavior?

 

Thanks. 

Share this post


Link to post
Share on other sites

I had similiar situat today - probably problem is generated by placemnt script

Share this post


Link to post
Share on other sites
On 2/5/2017 at 0:31 PM, SSG-Levi said:

Hi, 

I was trying to implement the LPD-29 static ship mod which was created for ARMA2 in a training mission I'm creating. 

While this mod "works" in ARMA3, it has a little bug. 

When the ship is placed in the 3d editor at a certain point, it actually spawns ~50m west of its original position - when previewing the mission (causing the helicopters on the landing deck to spawn in the middle of the ship- as it can only be oriented from west to east).

Then, when getting back to the editor, the ship is located at its new location and when previewing again it jumps another 50m west and so on...

 

anyone have any suggestion or experience with this kind of behavior?

 

Thanks. 

I'm trying to make it spawn like the LHD does but this is how the author wrote the script to spawn it, it uses trigonometry.

 

// Original LHD placement script by ArMaTeC
// Adjust for Kuznetsov by Gnat
// Adjusted again for LPD-29 by Absolution

if (isServer) then {
    _lpdspawn = _this select 0;
    _lpddir = getdir _lpdspawn;
    _lpdspawn setpos[getposasl _lpdspawn select 0, getposasl _lpdspawn select 1, 0];
    _lpdspawnpoint = [getposasl _lpdspawn select 0, getposasl _lpdspawn select 1, 0];

    _XSin = sin(_lpddir);
    _XCos = cos(_lpddir);

    _vx = (_lpdspawnpoint select 0); // + (_XSin * 19.916) + (_XCos * 8.87891);
    _vy = (_lpdspawnpoint select 1); // + (_XCos * 19.916) - (_XSin * 8.87891);
    _vz = (_lpdspawnpoint select 2);

    _vxS1 = (_vx) + (_XSin * 35.51047) + (_XCos * 70.8505);
    _vyS1 = (_vy) + (_XCos * 0) - (_XSin * 79.25141);

    _vxS2 = (_vx) + (_XSin * 35.51047) + (_XCos * 70.8505);
    _vyS2 = (_vy) + (_XCos * 0) - (_XSin * 79.25141);

    _xx = 50 preloadObject "lpd_sec_aft";
    _xx = 50 preloadObject "lpd_sec_mid";
    _xx = 50 preloadObject "lpd_sec_bow";

    _dummy0 = "lpd_sec_mid" createvehicle _lpdspawnpoint;
    _dummy0 setdir _lpddir;
    _dummy1 = "lpd_sec_bow" createvehicle _lpdspawnpoint;
    _dummy1 setdir _lpddir;
    
    _dummy0 setpos [_vxS1, _vyS1, _vz];
    _dummy1 setpos [_vxS2, _vyS2, _vz];        

};

 

 

I have everything else working on the ship I just can't fix the script to get them to spawn at the right height and positions.

Share this post


Link to post
Share on other sites

Are you trying to fix the orientation issue (making it face north)?

or the "spawning 50m west every restart" bug?

 

Maybe try to have it face in a certain direction first, in order to isolate the issue. 

 

If you could "dumb down" the script to have a main variable for direction instead of the trigonometric function - 0, 90, 180 and 270 deg. Or a fixed direction (90deg.) Maybe it will help. 

The original A2 version also only supported 90 and 270deg. 

But the translation issue seems new to A3. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×