Setting constant combinator signals
Posted: Thu Aug 18, 2016 6:34 pm
I'm hoping that somebody can help me with a problem I'm having in setting multiple signals in a constant combinator. To set a single signal (try saying that quickly
) I'm using something like this:
This works. My problem is I need to set multiple signals. So I tried different variations on this:
Unsurprisingly (given my Lua noobishness), that did not.
If anyone has any pointers, I'd be grateful

Code: Select all
local x= -22.5;
local y = 96.5;
local cc = game.surfaces[1].find_entity('constant-combinator',{x,y});
if cc.name == "constant-combinator" then
local setcc = cc.get_or_create_control_behavior();
setcc.parameters ={parameters ={{signal ={type = "item",name = "iron-plate"},count = 11,index = 1}}};
end;
Code: Select all
setcc.parameters= {{parameters ={{signal ={type = "item",name = "iron-plate"},count = 11,index = 1}}},
{parameters ={{signal ={type = "item",name = "copper-plate"}, count = 22,index = 2}}}};
If anyone has any pointers, I'd be grateful