Page 1 of 1

Setting output value of entity

Posted: Sat Aug 15, 2015 10:36 am
by Schorty
Hi folks,

I'm tinkering on a new mod, which requires setting a circuit network value, but I can't figure out, how I get it to emmit any signal. I also looked through some other mods, but couldn't find some hints on this one. Do you have any idea?

Greetings,
Schorty

Re: Setting output value of entity

Posted: Sat Aug 15, 2015 1:20 pm
by GopherAtl
the circuit network access is currently... restricted. You can access it only indirectly through specific interfaces implemented for certain item types. The only way I've found to just output arbitrary signals is to use a constant combinator, where get_circuit_condition returns an array of the 15 slots with type and quantity, and you can pass the same kind of array in to set_circuit_condition to set the values to what you want to output (see the source for my logistic combinator, thread linked in my sig, github link from there, for an example doing this)

Re: Setting output value of entity

Posted: Sat Aug 15, 2015 2:33 pm
by Schorty
That sounds promising. I'll have a look into this. Thank you :)