Jump to content
Sign in to follow this  
loki

locality of an object after 'detach object'

Recommended Posts

howdy...

issue is ONLY on dedicated:

how do you get around that a global object becomes local when 'detach object' is fired off?.. like in a paradrop script?

60op.jpg

Share this post


Link to post
Share on other sites

If the para drop runs on the server, otherwise you'd have to request to the server to set locality back to wherever.

What happens after the detach?

Can't you have a function to do the rest (after detach) and do a BIS_fnc_MP with the object as target (so it runs where the object is local)

Share this post


Link to post
Share on other sites

thanks for the replies:

@trajin - setOwner won't work because 'any' player is just picking up a vehicle and dropping it off.

@cuel - it appears that when 'any' player uses the attachTo.. the object attached becomes local to the client machine that ran the function. hence when the sever tries to create a parachute and move the 'detached object' into it.. i get the 'object' is remote error.

what i did was ugly and doesn't solve the isssue of the function... but oh well. thanks for the insight.

server grabs the object right after detach.. deletes it and spawns a new object in its place.. object is now global again..

<snip>
_dropped_type = typeOf _dropped;
_dropped attachTo [_veh,[0,2,-5]];
sleep 0.1;
detach _dropped;

//ugly workaround.. i hope
deleteVehicle _dropped;
_newObj =_dropped_type createVehicle position _veh;
_newObj setpos (_veh ModelToWorld [0,0,-16]);
</snip>

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×