Jump to content
  • 0

Loot Spawn Distance / Time ?


maximquasi

Question

8 answers to this question

Recommended Posts

  • 0

bump would like to know this too.

 

I know that a player has to be in between 30-120 meters for loot to spawn and if player is inside the 30 meter range the loot won't spawn.

 

Also loot doesn't spawn if you are inside vehicle so going in with a car to some military house or w/e and the player gets out of the car inside the 30m range the loot won't spawn until he goes out of the 30m range, I find this system very clunky and kinda bad to be honest is there a way to change this?

Link to comment
Share on other sites

  • 0

you can edit player_spawncheck (? I think thats the right file, but unsure right now) and call it via custom compiles in your mission. You can edit the distance that loot is spawned and stops spawning, and you can also edit zombie spawns. if you want more loot, increase the distance that it starts spawning, and decrease the distance that it stops spawning.

Link to comment
Share on other sites

  • 0

you can edit player_spawncheck (? I think thats the right file, but unsure right now) and call it via custom compiles in your mission. You can edit the distance that loot is spawned and stops spawning, and you can also edit zombie spawns. if you want more loot, increase the distance that it starts spawning, and decrease the distance that it stops spawning.

 

Thank you very much I'm going to look into it later :)

Link to comment
Share on other sites

  • 0
	//Loot
		if ((_dis < 120) && (_dis > 30) && !_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) && (!_cleared)) then {
				_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
				{deleteVehicle _x} count _nearByObj;
				_x setVariable ["cleared",true,true];
				_x setVariable ["looted",_dateNow,true];
			};
			if ((_age > DZE_LootSpawnTimer) && (_cleared)) then {
				//Register
				_x setVariable ["looted",_dateNow,true];
				//cleanup
				_x call building_spawnLoot;
			};
		};

if ((_dis < 120) && (_dis > 30) && !_inVehicle) then {

remove the && !_inVehicle

Link to comment
Share on other sites

  • 0

Loot spawn and cleanup versus performance has always been an issue. Runaway loot spawning will lead to a performance hit fairly quickly on a busy server.

 

I would recommend a split system ( in or out of vehicle) and more intelligent decision making of the players intentions when driving, players in aircrafts should not produce loot unless reducing height at little forward speed. Bear in mind I haven't looked at loot spawning for a good while now :)

Link to comment
Share on other sites

  • 0

Yeah I understand about the vehicle part. The problem I had with the distance is when you get too close to a building in a car and you get out of car inside that 30 meter radius the building would be empty... I know I can't make it too low or loot is spawning by just walking around inside that building. Max distance where loot starts spawning won't matter. Unless of course I could just add loot spawning while inside vehicle and lower max loot spawn radius down to 60? and min distance 20?

 

I'll have to find the right balance.

 

I'm looking towards the 20-50 range for min-max with inside vehicle loot spawning. Will have to test it later.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...