Vampurica / DZMS-DayZMissionSystem

A logic and useability rewrite of the DayZChernarus Mission System
17 stars 22 forks source link

[Enhancement] Check for Players Within Radius before Spawning Missions #43

Closed mikeloeven closed 7 years ago

mikeloeven commented 8 years ago

There has been a major issue where new missions will spawn on top of players while looting a cleared mission. The missions spawning mechanism should check for any active players within the mission radius and delay the spawning of a new mission until there are no longer any players present. The game generally does not spawn zombies or AI directly on top of a player and the mission system should not do this either

Basically my concept for the system will be this.

once the mission is decided the missions radius will be placed on the map if there is an active player within 100m of the mission radius a warning message will be displayed about the new mission spawning and the player will have 5 minutes to leave the area. If no players are detected the mission will just spawn normally.

the warning and 5 minute timer will prevent missions from spawning ontop of players while simultaneously preventing players from intentionally blocking missions since after the 5 minute warning the mission will spawn regardless

skigoggles commented 8 years ago

I've been running DZMS for over a year and have yet to see this. In DZMSFunction.sqf there is a function named DZMSFindPos, which has code that looks for a number of things like water, buildings, etc. It should keep 500m away from players - _playerNear = {isPlayer _x} count (_pos nearEntities ["CAManBase", 500]) > 0;

I've reduced min to 350 and I still don't get them on top of each other.

did you implement static locations? too many in the blacklist?

Vampurica commented 7 years ago

As stated by skigoggles, this should already be checked for in the FindPos function.