yourry 14 Posted December 1, 2013 Hi, I do not understand, I can not teleport a player on a bag on the ground (named bob): player setpos (getpos bob); I spawn in water as if the position is not good. Yet the subject is well known with a test "isnull" to false. I placed next to the bag and the .rpt I display the coordinates of the bag and me: player: "[1851.17,5746.79,0.00143862]" backpack:"[3702.93,11492.2,11.8185]" http://img4.hostingpics.net/pics/482718sac.png Coordinates are radically different. I do not understand. Is this is a bug in the game or that I mistaken somewhere ? Share this post Link to post Share on other sites
iceman77 18 Posted December 1, 2013 (edited) Yeah I think it's messed up. Maybe it's related to this & this. Here's what should be a work around (from the linked thread): _bp = createVehicle ["B_UAV_01_backpack_F", getPosATL someObject, [], 0, "CAN_COLLIDE"]; _backPackLoc = _bp modelToWorld [0,0,0]; player setPos _backPackLoc; Edited December 1, 2013 by Iceman77 changed spawn position of backpack from player & shortened the script Share this post Link to post Share on other sites
yourry 14 Posted December 1, 2013 Thank you very much for the answer. I tested the following command: player setpos (bob modelToWorld [0,0,0]) It works well. Thank you! Share this post Link to post Share on other sites
iceman77 18 Posted December 1, 2013 Very nice! Glad to help. Share this post Link to post Share on other sites
zgmrvn 95 Posted December 1, 2013 (edited) Objects on the ground like weapons, ammo, bags are placed in an object named weapon holder, "GroundWeaponHolder", so you should check for a near weapon holder, not a bag. nearestObject [player, "B_AssaultPack_cbr"]; // return <NULL-object> nearestObject [player, "GroundWeaponHolder"]; // return the ground weapon holder : 517cc800# 1770531: dummyweapon.p3d Edited December 1, 2013 by Zigomarvin Share this post Link to post Share on other sites
iceman77 18 Posted December 1, 2013 (edited) I think he wants to teleport to a specific bag that he's created. Is there any need to return nearest weaponHolder after creating / placing the backpack, instead of the location & just going directly to the backpack's position? I could be wrong though :p Edited December 1, 2013 by Iceman77 Share this post Link to post Share on other sites
zgmrvn 95 Posted December 1, 2013 nearestObject was just an exemle, however, I've just tryed this "B_AssaultPack_cbr" createVehicle getPos player; // i can see a bag on my position nearestObject [player, "B_AssaultPack_cbr"]; // return <NULL-object> nearestObject [player, "GroundWeaponHolder"]; // return the ground weapon holder : 517cc800# 1770531: dummyweapon.p3d Seems bags and probably weapons, ammo, items... are automaticatly placed in a weapon holder at they creation. Share this post Link to post Share on other sites
iceman77 18 Posted December 1, 2013 Yeah they do if I'm not mistaken. Also, today I found weaponHolderSimulated courtesy of Zapat. That can be used to detect dead body weaponholders / weapons and such. Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted December 1, 2013 tip: you can use getBackpackCargo and the related commands to find out whats in the weaponHolder Share this post Link to post Share on other sites
iceman77 18 Posted December 1, 2013 Oh now that is handy to know. Thanks Mattar. Share this post Link to post Share on other sites