Page 1 of 1

Custom GUI Screen

Posted: Sun Sep 11, 2016 1:44 pm
by LuziferSenpai
Hey,

I want to show a Screen with all avaible Recipes in the Game, but only them that are the player can see. When you click on a Custom Entity and than say that if for this recipe the virtual signal is 1 or more than set the recipe in the Assembler or Chemical to that Recipe, but only if it possible to craft there.

I dont know how i can make that.

So i ask for help.

And if you can help me fast getting it working that only in front of the entity is searching, than pls say that.

This is how i search at the Moment:

Code: Select all

function getConnectedEntity( combi )
	local connectedEntitys = combi.surface.find_entities( { { x = combi.position.x - 1, y = combi.position.y - 1 }, { x = combi.position.x + 1, y = combi.position.y + 1 } } )
	for _,entity in ipairs(connectedEntitys) do
		if ( entity.valid and entity.type == "assembling-machine" ) then
			return entity
		end
	end
end
Greetz,

Luzifer

Re: Custom GUI Screen

Posted: Wed Sep 14, 2016 4:28 am
by LuziferSenpai
PUSH