Thank you, I had already been trying to use the onevent function but I'm still having issues.
 require "defines"
game.onevent(defines.events.onbuiltentity, function(event)
 if event.createdentity.type == "enemy" and game.darkness > 0.5 then
 game.createentity{name = "zombie", position= game.entity ...
					Search found 3 matches
- Mon Dec 22, 2014 5:15 am
 - Forum: Modding help
 - Topic: Help reading darkness value
 - Replies: 2
 - Views: 1329
 
- Fri Dec 12, 2014 3:55 pm
 - Forum: Modding help
 - Topic: [technology-description]
 - Replies: 1
 - Views: 1301
 
Re: [technology-description]
Assuming your tech name is right, maybe check your language settings to make sure its set to English (you already probably know) and make sure your directory is correct. 
"__mod-name__\locale\en".
Also i don't know if it would effect anything but "long range defence" in the description might be ...
					"__mod-name__\locale\en".
Also i don't know if it would effect anything but "long range defence" in the description might be ...
- Fri Dec 12, 2014 2:40 pm
 - Forum: Modding help
 - Topic: Help reading darkness value
 - Replies: 2
 - Views: 1329
 
Help reading darkness value
I need help reading the darkness value on a unit spawner so I can disable spawning in the day. I understand that darkness is a read only property but I dont understand how to use it properly yet. result_units =
(function()
local res = {}
if game.entity.darkness > 0.5 then
end
res[1] = {"1", {{0 ...
					(function()
local res = {}
if game.entity.darkness > 0.5 then
end
res[1] = {"1", {{0 ...