Jump to content
  • 0

Explaining


Anhor

Question

Can someone explain me the technical difference between this two methods?

Method 1:

Spoiler

if (isServer) then {

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_asf3_0_2000", [11454.295, 12230.232, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir 24;
  _this setPos [11454.295, 12230.232, 0];
};

};

Method 2:

Spoiler

if (isServer) then{

_bldObj = objNull;
if (true) then
{
  _bldObj = createVehicle ["MAP_asf3_0_2000", [11454.295, 12230.232, 0], [], 0, "CAN_COLLIDE"];
  _bldObj = _bldObj;
  _bldObj setDir 24;
  _bldObj setPosATL [11454.295, 12230.232, 0];
};

};

Both do the same ........ but what is the difference?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Just now, Anhor said:

But technical they the same? I use allways the second method.

BTW, a small tipp:

To place things over water use:


setPosASL

ATL = above terrain level

ASL = above sea level

 

i think ATL & ASL are godd if u need pickup  one of the 3 coords

select 0 , select 1...

Xobject = createVehicle "MAP_asf3_0_2000";
_pos = getposATL player;
_dir = getdir player;
_pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir), (_pos select 2)];
_Xobject setDir _dir;
_Xobject setposATL _pos;

this set object pos just in front of the player

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...