Page 1 of 1

get_control_behavior

Posted: Sun Jun 25, 2017 9:06 pm
by darkfrei
Hi all!

There is function of Constant Combinator:
ConstantCombinatorControlBehavior.parameters
It means, if I need this parameters, it looks like:

Code: Select all

local parameters = entity.get_control_behavior().parameters.parameters
and this table is like

Code: Select all

{count = 1, index = 1, signal = {name ="signal-ID", type = "virtual"}}, -- if full
{count = 1, index = 2, signal = {type = "item"}}, -- if empty
Why we have this .parameters.parameters? Why not just .parameters?

Re: get_control_behavior

Posted: Sun Jun 25, 2017 10:41 pm
by Rseding91
It's an artifact of how blueprints export as strings. I could fix it but it will break every mod that uses it this way.

Re: get_control_behavior

Posted: Mon Jun 26, 2017 1:57 am
by DaveMcW
Sounds like a good fix for 0.16 then. :D