View Full Version : Brush Building
13th Sep 2001, 07:37 PM
I've just started trying to create a few brushes for custom applications I have in maps.
I've started very simple; I'm actually fairly decent at placing vertexs exactly where I want them, but I'm having a hell of a time figuring out quite how the PolyXi() functions work; as far as how vertex's are numbered (I assumed they were in order of creation, but either that's not the case or I'm doing something else wrong).
Basically I'm looking for documentation on Poly3i() and Poly4i() if anyone out there knows about that; It would be alot of help.
15th Sep 2001, 06:27 AM
the vertexes are ordered by number of creation, but they almost never start at 0.
before you make the first vertex you should have something like this:
n = GetVertexCount();
then vertex 0 will be 0+n
vertex 1 will be 1+n
Poly4i makes a polygon like a square and poly3i will make a triangle:
native function Poly3i( int Direction, int i, int j, int k, optional name ItemName, optional int PolyFlags );
first the int Direction. that must be either a -1 or a +1. this will tell the engine wich direction the face is.
then the 3 (or 4) numbers of the vertexes come
then the name of the polygon follows (i don't know what it does, sorry)
then as last is the polyflags. if you don't use this the polygon will just be a normal 1 side polygon
then there is the
native function PolyBegin( int Direction, optional name ItemName, optional int PolyFlags );
native function Polyi( int i );
native function PolyEnd();
this is for polygons with more then 4 vertexes
with polybegin you start a new polygon and tell the direction itemname and polyflags.
then with polyi you give the next vertex
once you done you use polyend() to tell engine the polygon is finished
be sure to call
BeginBrush before you start.
and end the event with:
hope this helps a bit
p.s: can someone pls explain me what the Itemname is for, tnx.
27th Sep 2001, 03:14 PM
itemname names the polys.
in UEd, select a poly, press SHIFT+I. polys in the same brush with the same name are selected too.
good for selecting the sides of a cylinder for example.
27th Sep 2001, 04:31 PM
i still think they should'v called that option
"Crash the Editor" :D or is it just mine that crashes when i use it?
28th Sep 2001, 02:08 AM
SHIFT+G crashes (select matching group)
I've never had problems with 'matching item' :)
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.