Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 10 11 12 13 14 … 18 Next »
Polygon Help needed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Polygon Help needed
08-12-2015, 06:21 PM, (This post was last modified: 08-12-2015, 06:23 PM by Destiny's Player.)
#1
Destiny's Player Offline
A passing by member
***
Posts: 237
Threads: 35
Joined: Dec 2013
Polygon Help needed
Basically, I need to somehow make a function which would automatically create a polygon and an outline of lines around it. Here's what I have so far.

function Draw(press,ptable,col,alpha)
local Polygon = render.createPoly(--something)
if press == 1 then
render.setColor(col[1]+20,col[2]+20,col[3]+20,alpha)
else
render.setColor(col[1],col[2],col[3],alpha)
end
render.drawPoly(Polygon)

render.setColor(255,255,255,alpha)
for i=1,#ptable do
--render.drawLine
end
--[[render.drawLine(p1x,p1y,p2x,p2y)
render.drawLine(p2x,p2y,p3x,p3y)
render.drawLine(p3x,p3y,p4x,p4y)
render.drawLine(p4x,p4y,p1x,p1y)]]
end

And I can't figure out, what to do to actually make it work. Mostly, I can't figure out how to make the polygon work... Can you even compose a polygon in multiple steps? ptable can be input in any way possible, right now I'm thinking about having tables within tables with both x and y in each slot.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Polygon Help needed - by Destiny's Player - 08-12-2015, 06:21 PM
RE: Polygon Help needed - by Person8880 - 08-12-2015, 06:41 PM
RE: Polygon Help needed - by Destiny's Player - 08-12-2015, 07:16 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.