Jump to content

[FIX] Plot Management Object Counter


BigEgg

Recommended Posts

I found that the default object counter with plot management counted every object within the plot radius. So trees etc were counted which got very annoying. Here is what I did to fix it (it is very simple):

 

Open plotObjects.sqf

 

Replace this code:

_range = DZE_PlotPole select 0;
_count = count ((getPosATL player) nearObjects ["All",_range]);

With this code: 


_range = DZE_PlotPole select 0;
_cptarget = player;
_objectClasses = DZE_maintainClasses;
_objects = nearestObjects [_cptarget, _objectClasses, _range];
 
_objectsnearcount = count _objects;
_count = _objectsnearcount;

Done :)

 

Credits for Plot Management and the original Object counter go toward Zupa :)

Link to comment
Share on other sites

It's nice people finally start contributing on this. Since i'm now way past beginner lvl on this, i want to give you some advice. 

 

There is no need of putting stuff into local variables ^^ 

 

The following would work 2 :

_count = count (nearestObjects [player, DZE_maintainClasses, DZE_PlotPole select 0]);

6 to 1 line ^^ performance x 6

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...