Jump to content

I need help with _this enableSimulation false; please


DangerRuss

Recommended Posts

I have custom NPC bankers around my map with some little esthetic things like a foldtable and a laptop, etc. They aren't in safe zones and people can just shoot or knock the objects around. I've tried this for example

_vehicle_187 = objNull;
if (true) then
{
  _this = createVehicle ["FoldTable", [6221.2905, 4625.8779, -0.079633094], [], 0, "CAN_COLLIDE"];
  _vehicle_187 = _this;
  _this setDir 118.5292;
  _this setPos [6221.2905, 4625.8779, -0.079633094];
  _this enableSimulation false;
};

but no luck, you can still knock everything around. Any ideas or help would be greatly appreciated.

Link to comment
Share on other sites

On my mobile so cannot give specifics but if you take a look at show plot boundary from my A Plot for Life mod, it creates a ring of road cones with enable simulation false as they used to fall over if placed on a hill without setting that. Maybe the code there can give some idea as to why yours is not working.

Link to comment
Share on other sites

On my mobile so cannot give specifics but if you take a look at show plot boundary from my A Plot for Life mod, it creates a ring of road cones with enable simulation false as they used to fall over if placed on a hill without setting that. Maybe the code there can give some idea as to why yours is not working.

Could be worth exploring.. had a peak, looks like this for P4L

_object = createVehicle ["Land_coneLight", _location, [], 0, "CAN_COLLIDE"];
_object setVariable ["Inventory", ["PPMarker"],true];
_object enableSimulation false;
_object setpos _location;
};

 

Try something like this:

_this setVehicleInit "this enablesimulation false;";

Instead of 

_this enableSimulation false;

I'll give that a shot thanks

 

EDIT - WINNER WINNER CHICKEN DINNER!

_this setVehicleInit "this enablesimulation false;";

did the trick. Thanks!

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...