Jump to content
  • 0

DZE_LootSpawnTimer


Achmed

Question

How does the DZE_LootSpawnTimer work?

Is it the case that what ever it's set to is how many minutes before the next loot will spawn?

Ed. DZE_LootSpawnTimer = 60 means loot will spawn 60 min after it last spawn stopping people from loot cycling

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
		//Loot
		if ((_dis < 120) and (_dis > 30) and !_inVehicle) then {
			_looted = (_x getVariable ["looted",-0.1]);
			_cleared = (_x getVariable ["cleared",true]);
			_dateNow = (DateToNumber date);
			_age = (_dateNow - _looted) * 525948;
			//diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
			if ((_age > DZE_LootSpawnTimer) and (!_cleared)) then {
				_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
				{deleteVehicle _x} forEach _nearByObj;
				_x setVariable ["cleared",true,true];
				_x setVariable ["looted",_dateNow,true];
			};
			if ((_age > DZE_LootSpawnTimer) and (_cleared)) then {
				//Register
				_x setVariable ["looted",_dateNow,true];
				//cleanup
				_x call building_spawnLoot;
			};
		};

Its the time between the loot being respawned in minutes.

By default when the player is the correct distance the loot checks if it is older than the lootspawntimer.

If the loot is older, the loot gets deleted and re-spawned.

Link to comment
Share on other sites

  • 0

So if i was to set it to "DZE_LootSpawnTimer = 60", does that mean that no matter what there will be no new loot for a hour or if all the loot was cleared up would it then spawn again regardless?

 

If you set it to 60 then the loot will sit there until the server cleans it up for a player not being nearby, or the player sits there an hour.

At default it is set to 10minutes.

Setting it lower will make loot respawn faster.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...