circuit condition and LuaControlBehavior ?

Place to get help with not working mods / modding interface.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

circuit condition and LuaControlBehavior ?

Post by binbinhfr »

Hi,

in 0.12 I had a piece of code to set the condition of a constant combinator :

Code: Select all

					params = {parameters={
						{index=1,signal={type="virtual",name="signal-clock-gametick"},count=math.floor(game.tick)},
						{index=2,signal={type="virtual",name="signal-clock-day"},count=global.day},
						{index=3,signal={type="virtual",name="signal-clock-hour"},count=tim_h},
						{index=4,signal={type="virtual",name="signal-clock-minute"},count=tim_m},
					}}
					
					-- problem here to solve
					entity.set_circuit_condition( defines.circuitconditionindex.constant_combinator, params )
I do not figure out how to translate this into 0.13 API, using probably :

http://lua-api.factorio.com/0.13.0/LuaC ... avior.html

any help ?
My mods on the Factorio Mod Portal :geek:
ItsTheKais
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Aug 28, 2015 7:53 pm
Contact:

Re: circuit condition and LuaControlBehavior ?

Post by ItsTheKais »

Code: Select all

entity.get_control_behavior().parameters = params
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: circuit condition and LuaControlBehavior ?

Post by binbinhfr »

thanks !
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Modding help”