Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
frankforsyth

Problem with mapGridPosition in checking backpack position

Recommended Posts

Hello guys,

recently I came into problem with command mapGridPosition. It works perfectly when I'm checking other object like soldier, but when it checks backpack grid, I get weird numbers:

Backpack is in grid 128 141, but mapGridPosition says that it is 254 283

Just for making sure, here is code I'm running:

In init field of player:

this addAction ["Weapon plans location", "backpackGrid.sqf"];  

In backpackGrid.sqf

_backpackGrid = mapGridPosition weapon_plans;
hint format ["Weapon plans are at grid %1", _backpackGrid];

Share this post


Link to post
Share on other sites

What about something like this?

[color=#000000][color=#0000BB]
[/color][/color]_bp = createVehicle ["B_UAV_01_backpack_F", getPosATL player, [], 0, "CAN_COLLIDE"];
_backPackLoc = _bp modelToWorld [0,0,0];
_gridPos = mapGridPosition _backPackLoc;
hint format ["Weapon plans are at grid %1", _gridPos];

Edited by Iceman77

Share this post


Link to post
Share on other sites
Sign in to follow this  

×