LuaRendering.draw_polygon - confusing vertices description

Post Reply
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

LuaRendering.draw_polygon - confusing vertices description

Post by moon69 »

From LuaRendering.draw_polygon...
vertices :: array of ScriptRenderTarget:
target :: Position or LuaEntity
target_offset :: Vector (optional): Only used if target is a LuaEntity.
but 'vertices' doesn't seem to take ScriptRenderTargets! To be fair, the ScriptRenderTarget in the above code is plain text (ie: not linked), but still confusing!

It worked for me with something like:

Code: Select all

vertices = { {target={1,2}}, {target={3,4}}, {target={5,6}}, ...}

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaRendering.draw_polygon - confusing vertices description

Post by Bilka »

Does this solve the problem for you?
Image

If not, could you try to explain what exactly is confusing with the description/what information you are missing?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: LuaRendering.draw_polygon - confusing vertices description

Post by moon69 »

Thanks Bilka,

I think the confusion was because I've become used to most things like ScriptRenderTarget having a reference on the Concepts page - often with extra explanation or examples.

So it's much better that CustomScriptRenderTarget avoids confusion with ScriptRenderTarget as you show, but I suspect in x months time I'll be wondering why CustomScriptRenderTarget isn't clickable (my memory being somewhat... non-deterministic!).

Post Reply

Return to “Resolved Requests”