1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Brush Building

Discussion in 'Programming' started by Fetish, Sep 13, 2001.

  1. Fetish

    Fetish GhettoBlaster

    Joined:
    Sep 13, 2001
    Messages:
    72
    Likes Received:
    0
    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.

    Thanks.

    - Fetish
     
  2. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    hi

    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
    etc.

    -----

    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:
    return EndBrush();

    hope this helps a bit

    p.s: can someone pls explain me what the Itemname is for, tnx.
     
  3. tarquin

    tarquin design is flawed

    Joined:
    Oct 11, 2000
    Messages:
    3,945
    Likes Received:
    0
    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.
     
  4. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    i still think they should'v called that option

    "Crash the Editor" :D or is it just mine that crashes when i use it?
     
  5. tarquin

    tarquin design is flawed

    Joined:
    Oct 11, 2000
    Messages:
    3,945
    Likes Received:
    0
    SHIFT+G crashes (select matching group)
    I've never had problems with 'matching item' :)
     

Share This Page