Ppgtjmad / SimpleShops

[HG] Simple Shops
27 stars 8 forks source link

spawn position got way off from the marker if the markers is inside the object #49

Closed Heinz132 closed 4 years ago

Heinz132 commented 4 years ago

hello, im attempting to make the custom garage which i placed from the editor

i placed the platform on the ground for a stable floor and put the hanger on it and put two marker inside the hanger

but when i spawn the vehicle, it spawned way far off from the markers and collide with the hanger's wall and explode

i tried to change [_classname,_sp,[],0,"NONE"] to [_classname,_sp,[],0,"CAN_COLLIDE"] in the spawnvehicle.sqf but it still keeps spawning at wrong position

advice needed

Ppgtjmad commented 4 years ago

Hi there,

In the same file, line 46:

Change _vehicle = _classname createVehicle (markerPos _sp);

To

_vehicle = createVehicle [_classname,(markerPos _sp),[],0,"CAN_COLLIDE"];

The line you modified is for when the passed position is in this format [0,0,0] but since you use markers the passed position is a string (marker name) so the else statement kicks in.

Heinz132 commented 4 years ago

Thanks for the advice! now it's spawning at the right position.