Page MenuHomeFeedback Tracker

attachTo, setPos, deleteVehicle - not working on created Backpack.
Closed, ResolvedPublic


You can not attach or setpos a script created backpack. Also deleteVehicle do nothing.


Legacy ID
No Bug
Steps To Reproduce

pack = "B_TacticalPack_Base" createVehicle [0,0,0];
sleep 0.1;
pack setPos (player modelToWorld [0,0.8,0]);
pack attachTo [player,[0,0.8,0]];
pack setDir 0;
pack setPos getPos pack;
sleep 5;
detach pack;
deleteVehicle pack

Event Timeline

R34P3R edited Steps To Reproduce. (Show Details)Aug 7 2015, 1:29 AM
R34P3R set Category to Engine.
R34P3R set Reproducibility to Always.
R34P3R set Severity to None.
R34P3R set Resolution to No Bug.
R34P3R set Legacy ID to 1434574436.May 8 2016, 12:29 PM

This is not a bug. createVehicle command will return backpack container. As it is a proxy you can only add items to it but cannot move or attach it. To move backpack you need to access the weaponholder that carries this proxy. Lucky for you new command objectParent will be available from Monday, so you could do this:

//place created backpack in front of player
_bpContainer = "B_TacticalPack_rgr" createVehicle [0,0,0];
_weaponHolder = objectParent _bpContainer;
_weaponHolder setPos (player modelToWorld [0,5,0]);

R34P3R added a subscriber: R34P3R.May 8 2016, 12:29 PM
R34P3R added a comment.Aug 7 2015, 9:45 PM

ok thanks KZ will try this.