Jump to content
  • 0

DayZ house lighting


Voltan

Question

7 answers to this question

Recommended Posts

  • 0

@Voltan looks like it still would.

Just had a quick look at it and it looks fine, looks like it just checks 600m near players and creates lights in the buildings listed.
Im not sure about buildings but I've read eBay saying nearEntities is faster than nearestObjects. From my understanding you can use it in this instance so maybe try that too.

 

https://community.bistudio.com/wiki/nearEntities

 

Link to comment
Share on other sites

  • 0

There is this one in the default init.sqf: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf#L141

I'm pretty sure it's that script, it is very fps intensive which is why it's disabled by default.

nearEntities is significantly faster than nearestObjects, but nearestObjects is the only function that will accept multiple classnames or an array of classnames, which is what the linked script in OPs post uses, so you are stuck using nearestObjects.

Link to comment
Share on other sites

  • 0
On 02/05/2017 at 3:41 PM, salival said:

nearestObjects is the only function that will accept multiple classnames or an array of classnames.

On the Bohemia wiki they give this example though?

_list = player nearEntities [["Car", "Motorcycle", "Tank"], 50];
_list = (position player) nearEntities [["Man", "Air", "Car", "Motorcycle", "Tank"], 200];

 

I'm not saying I'm right. Curiosity :)

Link to comment
Share on other sites

  • 0
2 minutes ago, oldmatechoc said:

On the Bohemia wiki they give this example though?


_list = player nearEntities [["Car", "Motorcycle", "Tank"], 50];
_list = (position player) nearEntities [["Man", "Air", "Car", "Motorcycle", "Tank"], 200];

 

I'm not saying I'm right. Curiosity :)

Class names, not classes

Link to comment
Share on other sites

  • 0
11 minutes ago, Anhor said:

For what is the


[false,12]

on the front of the row?

 

_this select 0; (false) is a boolean (true/false) to if it requires a generator to be there for the lights to work

_this select 1; (12) is the number of random light points

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/local_lights_init.sqf#L14-L15

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