Jump to content
Sign in to follow this  
morgans762

Backpack empty when not hosting?

Recommended Posts

When Im hosting a game my backpack will be loaded with the items I scripted there. When playing on someone elses server my backpack shows empty. Does anyone know about this issue? Thanks!

Share this post


Link to post
Share on other sites

I dont get any error messages, backpack will just read as empty. I am using a disc and my friend that I play with is using steam. It happens both ways, when I am hosting he cant see the items in his pack and when he is hosting I cant see the items in mine. Im stumped.

Share this post


Link to post
Share on other sites

All the scripting is perfect. It shows up fine in my own game. It does not show up when in another hosts game.

Share this post


Link to post
Share on other sites

Just confirm, you're using addWeaponCargoGlobal? Would you be able to post the code, or at least some of it, here? It will be much easier to help you solve the problem if we can see this :)

To explain a bit more, the fact that you can see it and others can't, and the other way around, sounds like an issue of locality. Some script commands only work on the client they are issued on, such as addWeaponCargo. A new command, addWeaponCargoGlobal, was created that ensures it is issued on all clients.

Edited by Rocket

Share this post


Link to post
Share on other sites

this is the exact script I am using-

clearMagazineCargo (unitBackpack this); (unitBackpack this) addMagazineCargo ["UKF_5Rnd_338_Mag",6];this addMagazine "Laserbatteries";(unitBackpack this) addMagazineCargo ["SmokeShell",2];

Share this post


Link to post
Share on other sites
this is the exact script I am using-

clearMagazineCargo (unitBackpack this); (unitBackpack this) addMagazineCargo ["UKF_5Rnd_338_Mag",6];this addMagazine "Laserbatteries";(unitBackpack this) addMagazineCargo ["SmokeShell",2];

Ah yes! it is a locality issue just as I thought, hence why I asked about addWeaponCargoGlobal. In multiplayer, you must use this command if you want it syncronized across all clients.

addMagazine and addWeapon ARE syncronized, so you won't see the issues with that. But the cargo commands require you to use a different command in a networked environment. Let us know if there are any problems!

Try this code:

clearMagazineCargo (unitBackpack this);(unitBackpack this) addMagazineCargoGlobal ["UKF_5Rnd_338_Mag",6];this addMagazine "Laserbatteries";(unitBackpack this) addMagazineCargoGlobal ["SmokeShell",2];

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  

×