Jump to content

Recommended Posts

Hello, community.

I am working on a Coop mission, where I have placed 3 playable units. I will perhaps add more later, depending on my later ideas. They all (including me - the player) need to be able to pick up an item (a specific bagpack - ace_gunbag_Tan). I have placed this object on the ground and I am the only one who can pick it up right now, but it is an important item, being also a protective gear. 😄 So, when I or the other players pick up the first object, the same object should respawn on its previous location after, let us say, 10-15 seconds. It should respawn exactly X times, according to the playable count of units. How do I achieve that?

Thank you in advance and cheers! 🙂

Share this post


Link to post
Share on other sites

Would it not be easier to just place 3 bags there to begin with, or is there a specific reason the waiting and spawning?

  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, beno_83au said:

Would it not be easier to just place 3 bags there to begin with, or is there a specific reason the waiting and spawning?

Well, that would be very simple, indeed, but if that is a global server, then all other players, who join it, should be able to find it after spawn. If it is not made for only 3 times, for example. 😄

Share this post


Link to post
Share on other sites

Well then, in that case you can just put the following into initPlayerLocal.sqf, which fires for each player when they join a mission:

_container addBackpackCargoGlobal [_backPackClass,1];

You just need a container to add it to. Example would be a vehicle or ammo box, or create a weaponHolder with this: https://community.bistudio.com/wiki/createVehicle - check Example 9 and MrSanchez's comment just below it.

  • Like 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

×