Jump to content
Sign in to follow this  
bigpickle

Create Vehicle Bug

Recommended Posts

Is this a known bug when using create vehicle command, its been a long standing question of mine so its time to ask.

_chute = "ParachuteMediumWest_EP1" createVehicle [0, 0, 0];

If i spawn this using a vehicles location ie below

_chute  = "ParachuteMediumWest_EP1" createvehicle [getpos _plane select 0,getpos _plane select 1,3000];
_chute setpos [getpos _plane select 0,(getpos _plane select 1)+10,(getpos _plane select 2)];

Then i get two parachutes instead of one!

Is this a known BIS bug?, is there a way to spawn 1 of something under these conditions.

Regards Bp

Share this post


Link to post
Share on other sites

First, how does this belongs to ADDONS: Config & scripting?

And second, is this behaviour seen on MP, one server and one client?

Share this post


Link to post
Share on other sites

This behaviour is seen when i host a dedi on my pc, i have to test that way as it has to work for MP, but i suspect it will do the same when on an independant server too.

Its part of a larger script for a support menu, using a plane to simulate a bomb run.

Its all sqf script based without the use of the editor.

Sorry if its the wrong sub forum but i thought that if anyone would know about this it would be the guys/girls who had encountered it while creating vehicles for addons or scripts. So with that in mind i put the thread here.

Share this post


Link to post
Share on other sites

You get 2 vehicles because the script is run on both the server and the client. With 20 clients you'll get 21 parachutes. Just add isServer check before spawning to make sure it only spawns once.

Share this post


Link to post
Share on other sites
You get 2 vehicles because the script is run on both the server and the client. With 20 clients you'll get 21 parachutes. Just add isServer check before spawning to make sure it only spawns once.

very sorry to ask but im still learning script language, do you mean like this?

if (!isServer) then 
{
_chute  = "ParachuteMediumWest_EP1" createvehicle [getpos _plane select 0,getpos _plane select 1,3000];
_chute setpos [getpos _plane select 0,(getpos _plane select 1)+10,(getpos _plane select 2)] ;
 };

Sorry about getting the wrong thread by the way guys :o

Edited by Bigpickle

Share this post


Link to post
Share on other sites
very sorry to ask but im still learning script language, do you mean like this?

if (!isServer) {
_chute  = "ParachuteMediumWest_EP1" createvehicle [getpos _plane select 0,getpos _plane select 1,3000];
_chute setpos [getpos _plane select 0,(getpos _plane select 1)+10,(getpos _plane select 2)] ;
 };

Sorry about getting the wrong thread by the way guys :o

if (isServer) then {
_chute  = "ParachuteMediumWest_EP1" createvehicle [getpos _plane select 0,getpos _plane select 1,3000];
_chute setpos [getpos _plane select 0,(getpos _plane select 1)+10,(getpos _plane select 2)];
};

Share this post


Link to post
Share on other sites

Oh yeah the one i posted says if its not the server then etc etc

Thank for the help chaps

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  

×