hogansheroes

Adding Vehicles To Traders for Looks

20 posts in this topic

Hey guys i cant remember how to do this or even to find it in the forums, so im wanting to add some vehicles to my traders that are locked so if you go to the vehicle trader there is also a armed vic there but you cant get in it to steal or sell it

Edited by hogansheroes

Share this post


Link to post
Share on other sites

Hello Hogan,

If you place them on the map via the editor, in the unit's properties, you can place in the init field:

this setVehicleLock "LOCKED";

And this will lock the vehicle.

See:  https://community.bistudio.com/wiki/setVehicleLock

 

I THINK this option might exist in the unit's properties as well.  It has been a while since I have to use that function.

I would also disable 'simulation' as well.  This is so that if it should be unlocked somehow, it will not be able to be moved.

:)

Edited by Z80CPU

Share this post


Link to post
Share on other sites
Advertisement
37 minutes ago, hogansheroes said:

after trying this way the vehicle was still accessable that you could get in drivers seat and gunners to use, anything else to try 

in the  editor it usually has an extra little icon on the list (like open doors on crates or locked etc)

Share this post


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

in the  editor it usually has an extra little icon on the list (like open doors on crates or locked etc)

ive tried them also thets for the, if i want damage ned

Share this post


Link to post
Share on other sites
20 minutes ago, hogansheroes said:

ive tried them also thets for the, if i want damage ned

I think this would work in the mission.sqm

Spoiler

 class Entities
 {
  items = 1;
  class Item0
  {
   dataType = "Object";
   class PositionInfo
   {
    position[] = {15086.8,17.8416,16044.5};
   };
   side = "Empty";
   flags = 4;
   class Attributes
   {
    lock = "LOCKED";
    createAsSimpleObject = 1;
    disableSimulation = 1;
   };
   id = 0;
   type = "C_Hatchback_01_dark_F";
  };
 };

 

Share this post


Link to post
Share on other sites
23 minutes ago, hogansheroes said:

ive tried them also thets for the, if i want damage ned

also I think (according to arma3) this should work:

Spoiler

private _objects = [
 ["C_Hatchback_01_dark_F",[15086.8,16044.5,16.3915],[[0,1,0],[0,0,1]],[false,false]]
];
{
 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 setVehicleLock "LOCKED";
} forEach _objects;

 

 

Share this post


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

also I think (according to arma3) this should work:

  Hide contents

private _objects = [
 ["C_Hatchback_01_dark_F",[15086.8,16044.5,16.3915],[[0,1,0],[0,0,1]],[false,false]]
];
{
 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 setVehicleLock "LOCKED";
} forEach _objects;

 

 

so for this one would i still add setVehicleLock "LOCKED"; to the init of the vehicle in the editor

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.