Jump to content
opendome

Having a Hard Time With Vehicle Respawn

Recommended Posts

Hey everyone! In my mission Im trying to make it so vehicles respawn without any items in their inventory but nothing Ive tried works. Ive tried putting 


"clearMagazineCargoGlobal this;
clearWeaponCargoGlobal this;
clearItemCargoGlobal this;
clearBackpackCargoGlobal this;"

 

in the vehicles init. I've tried using [_this select 0] execVM 'VehicleCargo.sqf'; in the modules expression field with VehicleCargo.sqf containing

"

if (!isServer) exitWith {};

// VEHICLES //

clearMagazineCargoGlobal this;
clearWeaponCargoGlobal this;
clearItemCargoGlobal this;
clearBackpackCargoGlobal this;"

 

Why is non of this working?

Thanks!

Share this post


Link to post
Share on other sites

Use MGI Advanced modules mod, his respawn vehicles one it should provide what you need

  • Thanks 1

Share this post


Link to post
Share on other sites

I had my problems with the respawn vehicle module as well.

The easiest solution would be to add this line into the Expression box of your Vehicle Respawn Module:

 

clearMagazineCargoGlobal (_this select 0);   clearWeaponCargoGlobal (_this select 0);   clearItemCargoGlobal (_this select 0);  clearBackpackCargoGlobal (_this select 0); 

 

Do not forget to sync the vehicle with the module.

Share this post


Link to post
Share on other sites
20 hours ago, opendome said:

Hey everyone! In my mission Im trying to make it so vehicles respawn without any items in their inventory but nothing Ive tried works. Ive tried putting 


"clearMagazineCargoGlobal this;
clearWeaponCargoGlobal this;
clearItemCargoGlobal this;
clearBackpackCargoGlobal this;"

 

in the vehicles init. I've tried using [_this select 0] execVM 'VehicleCargo.sqf'; in the modules expression field with VehicleCargo.sqf containing

"

if (!isServer) exitWith {};

// VEHICLES //

clearMagazineCargoGlobal this;
clearWeaponCargoGlobal this;
clearItemCargoGlobal this;
clearBackpackCargoGlobal this;"

 

Why is non of this working?

Thanks!

Simple:

- remove quotes "" there is no need for that wrapping an sqf.

- use _this instead of this inside the sqf (this is for init field of edited objects)

 

if (!isServer) exitWith {};

// VEHICLES //

clearMagazineCargoGlobal _this;
clearWeaponCargoGlobal _this;
clearItemCargoGlobal _this;
clearBackpackCargoGlobal _this;

 

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

×