Search found 3 matches
- Sun Nov 07, 2021 1:53 am
- Forum: Modding help
- Topic: Make machine only work during day time
- Replies: 8
- Views: 3601
Re: Make machine only work during day time
well the
[, mode=true]
means optional, you either remove this competely or include it as intended
so it should be like
set_frozen(entity)
-- or
set_frozen(entity,true)
-- or
set_frozen(entity,false)
depand on what effect you want.
Thank you for clarification.
After correcting it, the ...
- Sat Nov 06, 2021 7:06 pm
- Forum: Modding help
- Topic: Make machine only work during day time
- Replies: 8
- Views: 3601
Re: Make machine only work during day time
I have this code currently:
if hours < 4 or hours > 22 then
entity.active = false
end
if hours >= 4 or hours <= 22 then
entity.active = true
end
where I have a local variable entity and I give it the path to my entity lua file, however the machine does not stop working. I tried the code in ...
if hours < 4 or hours > 22 then
entity.active = false
end
if hours >= 4 or hours <= 22 then
entity.active = true
end
where I have a local variable entity and I give it the path to my entity lua file, however the machine does not stop working. I tried the code in ...
- Sat Nov 06, 2021 2:00 am
- Forum: Modding help
- Topic: Make machine only work during day time
- Replies: 8
- Views: 3601
Make machine only work during day time
I want to make machine that only works during the day, similar to solar panel. I tried using a function that would output me a crafting speed of 0 during the night hours, making the machine stop during night. However I get error:
"Value (function) can't be saved at property tree ROOT.assembling ...
"Value (function) can't be saved at property tree ROOT.assembling ...