Jump to content
Sign in to follow this  
yet another arma player

Tired of loosing vehicles on your base?

Recommended Posts

Well, let's research and figure out the roots of evil.


        _VAL = [typeOf _vehicle,[(getposATL _vehicle call EPOCH_precisionPos),vectordir _vehicle,vectorup _vehicle],damage _vehicle,_hitpoints,fuel _vehicle,_inventory,magazinesAmmo _vehicle,_colorSlot];
        ["Vehicle", _vehHiveKey, EPOCH_expiresVehicle, _VAL] call EPOCH_fnc_server_hiveSETEX;

Okay. WTF is EPOCH_precisionPos?


_low = _this apply {_x - (_x % 1)};
[_low, _this vectorDiff _low]

Looks weird, but there is nothing rly suspicious if you do some math.

Okay. Let's research MOAR!


                        // set final direction and postion of vehicle
                        _vehicle setVectorDirAndUp _worldspace;
                        _vehicle setposATL _location;

where _location is just a record taken from DB (previously saved)

So, what the duck is wrong with this code? Why we are still loosing our vehicles after server restart?

The answer is setPosATL. This function always adds random offset to coords of your object. setPosASL do it in the same way (Hello BIS! Burn in hell ya all!)

As a result all saved vehicles and buildings will be spawned not in exactly saved position.

So, how to solve this problem?

The answer is getPosWorld/setPosWorld.


If you change any "ATL/ASL" functions to "World", you will get control of precisious positioning of any objects on the map.

Here is simple sp-mission to test  http://steamcommunity.com/sharedfiles/filedetails/?id=769644621

P.S. Sorry for my bad googletranslanguage )



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Advertisement
  • Supporters
  • Discord

  • Create New...