Jump to content
fawlty

Create vehicle question

Recommended Posts

Guys, I'm trying to use a trigger to create a replacement vehicle, once it's lost, for multiplayer use rather than having to go to zeus.

The trigger is, radio to activate, repeatable, server only. 

The code for On Activation is

private _vehicle = "B_T_LSV_01_armed_F" createVehicle (getPos p1); ["AmmoboxInit",[_vehicle,true]] call BIS_fnc_arsenal;

 

This works fine when testing and I'm the only player.

When the other players are in game I'm getting multiple vehicles spawning  and of course mayhem (usually everyone dies with a vehicle  on their head 😉 ) and a lot of 'what the ****"

 

Would like this to work with only one vehicle spawning if you have an idea to fix this script

Thanks.

Share this post


Link to post
Share on other sites

Another option is to have the vehicle sitting on the map in an out of the way place.

 

Create a trigger and when the conditions are met, the trigger transports the vehicle to the correct location.

 

.

 

 

Share this post


Link to post
Share on other sites
11 hours ago, fawlty said:

Guys, I'm trying to use a trigger to create a replacement vehicle, once it's lost, for multiplayer use rather than having to go to zeus.

The trigger is, radio to activate, repeatable, server only. 

The code for On Activation is

private _vehicle = "B_T_LSV_01_armed_F" createVehicle (getPos p1); ["AmmoboxInit",[_vehicle,true]] call BIS_fnc_arsenal;

 

This works fine when testing and I'm the only player.

When the other players are in game I'm getting multiple vehicles spawning  and of course mayhem (usually everyone dies with a vehicle  on their head 😉 ) and a lot of 'what the ****"

 

Would like this to work with only one vehicle spawning if you have an idea to fix this script

Thanks.

 

Just modify you code like this:

if (isServer) then {private _vehicle = "B_T_LSV_01_armed_F" createVehicle (getPos p1); ["AmmoboxInit",[_vehicle,true]] call BIS_fnc_arsenal};

 

 

If you need to respawn a vehicle with arsenal, just use my respawn vehicle module (MGI advanced Modules)

  • Like 1

Share this post


Link to post
Share on other sites

Pierre, I'm getting a invalid number in expression error with this.

Share this post


Link to post
Share on other sites
14 minutes ago, fawlty said:

Pierre, I'm getting a invalid number in expression error with this.

 

should work... verify P1 as object or something else.

  • Thanks 1

Share this post


Link to post
Share on other sites

Never noticed your arsenal option before on the advanced module, looks to be all I need although sometimes a vehicle gets destroyed in a bad location, which is where the manual respawn comes in handy, also timing.

 

I'll keep playing with the error.

Edit; that was it I had my character labeled wrong.

 

Thanks once again

  • Like 1

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

×