Jump to content
Sign in to follow this  
ChadWicky

GroundWeaponHolder Respawn Timer/Spawn Trigger

Recommended Posts

I'm new to scripting, but I have a game logic set up to spawn items from a few loot tables I made. Right now I'm trying to figure out how to make the GroundWeaponHolder delete its weapons/ammo and spawn new weapons/ammo after a set amount of time.

Also is there a way to make the loot spawn when a player enters an area, then when the player leaves, old loot is removed and new loot is spawned 10 minutes later?

EDIT: Also how do you spawn vests and uniforms in GroundWeaponHolders?

Edited by ChadWicky

Share this post


Link to post
Share on other sites

EDIT: Also how do you spawn vests and uniforms in GroundWeaponHolders?

Just use the addItemCargo or addItemCargoGlobal depending on your usage for vests and uniforms.

small example:

_weapon_holder = createVehicle ["groundWeaponHolder", _pos, [], 0, "can_collide"];

_weapon_holder addItemCargoGlobal ["V_TacVest_oli", 1]; // adds 1 vest of classname "V_TacVest_oli"

_weapon_holder addItemCargoGlobal ["U_O_Officer_uniform", 1]; // adds 1 uniform of classname "U_O_Officer_uniform"

headgear and attachments are addItemCargoGlobal aswell, backpacks are addBackpackCargoGlobal. (using global here for mp functionality)

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  

×