• 0
Mr_Richards_

How to make a custom added vehicles locked

Question

I'm trying to make my own custom trader currently on the southside of Tonoa. I've added a showcase of two of the vehicles you can purchase there. The problem I'm having is how do I keep the vehicles, added with M3Editor and exported to the array, locked and un-enter-able from players. I've tried everything from locking it in the editor to checking some init variables (although I don't know what I'm doing). My vehicle looks like this currently in the array exported from M3Editor:

["O_T_MBT_02_cannon_ghex_F", [2087.81, 3459.07, 15.1398], [-0.266481, 0.96384, 0], [0, 0, 1], false],

Is there a certain script I need to add to keep the vehicle locked?

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Hi there, 

I was figuring out the same question. 

I made it work by doing this:

1: click on your vehicle that you have added

2: go to the topbar and click Exile

3: click on Convert into simple object

--> you will see your vehicle and a BBQ can on top of that, then make sure you SHIFT-click the can to rotate "the can", this will rotate the vehicle, it will only be visible when you launch your editor file, then export it. 

Share this post


Link to post
Share on other sites
Advertisement
  • 0

this is a secret betterdeadthanTed xD,

 

If you using the ExileEden Plugin too export the objects you can also use the same entry in example what i mean

you Export vehicles or simpleobjects like this.

private _vehicles = [
//["Exile_Plane_AN2_Green", [18174.3, 2131.17, 136.997], [0.727462, -0.667854, 0.157387], [-0.0983819, 0.125483, 0.987206], false]
];

{
    private _vehicle = (_x select 0) createVehicle (_x select 1);
    _vehicle allowDamage false;
    _vehicle setPosWorld (_x select 1);
    _vehicle setVectorDirAndUp [_x select 2, _x select 3];
    _vehicle enableSimulationGlobal (_x select 4);
    _vehicle setVariable ["ExileIsLocked", -1, true];
    
    if (_vehicle isKindOf "Exile_RussianRouletteChair") then
    {
        ExileRouletteChairs pushBack _vehicle;
        ExileRouletteChairPositions pushBack [_x select 1, getDir _vehicle];
    };
}
forEach _vehicles;


private _simpleObjects = [
["Exile_Plane_AN2_Green", [18174.3, 2131.17, 136.997], [0.727462, -0.667854, 0.157387], [-0.0983819, 0.125483, 0.987206], false]
];
{
    private _simpleObject = createSimpleObject [_x select 0, _x select 1];
    _simpleObject setVectorDirAndUp [_x select 2, _x select 3];
    
    {
        if ((toLower _x) in _invisibleSelections) then 
        {
            _simpleObject hideSelection [_x, true];
        };
    }
    forEach (selectionNames _simpleObject);
}
forEach _simpleObjects;

Some times you use in the Editor the option place as simple Object but is doesnt work the easy way os just placed the same code where are under _vehicles too the _SimpleObjects ^^

Share this post


Link to post
Share on other sites
  • 0

Have you tested that, @Sgt. ScrapMetal? My "vehicles" and "simpleobject" entries look different from each other so I assume they can't be interchanged:

"vehicles"

["Campfire_burning_F", [6808.68, 2437.93, 6.21954], [0, 1, 0], [0, 0, 1], true]

"simpleobject"

["a3\structures_f_epa\items\food\bottleplastic_v2_f.p3d", [6832.08, 2462.8, 6.12689], [0, 1, 0], [0, 0, 1]]

Note the difference in the classname. Vehicles use the classname and simpleobjects use the path/.p3d (not sure what that is called)

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.