+ Reply to Thread
Results 1 to 6 of 6

Thread: Vector Gates

  1. #1
    Lifetime Supporter DuFace is on a distinguished road DuFace's Avatar
    Join Date
    Aug 2007
    Posts
    210

    Default Vector Gates

    For a long time now Vector has been a registered Wire data type but they aren't supported by any gates at all, and only the Vector Thruster and the Target Finder even support them. So I've written a selection of Vector gates that will hopefully prove useful to people, and maybe even cause more wire devices to support the Vector data type.

    To install just download the attached Lua file and chuck it in the garrysmod\addons\wire\lua\autorun directory. To use, go to the Gate tool on the Q menu (these gates do not appear under the Wire - Control section because that would require modification of the wire gates STOOL file).


    Arithmetic Operations
    • Add
    • Subtract
    • Negate
    • Multiply/Divide by constant
    • Identity
    • Random
    Vector Operations
    • Dot/Cross Product
    • Yaw/Pitch (Degree/Radian)
    • Magnitude
    • Normalise
    Comparison
    • Equal
    • Inequal
    • Less-than
    • Less-than or Equal-to
    • Greater-than
    • Greater-than or Equal-to
    Rates of Change
    • Component Derivative
    • Component Integral
    Conversion
    • Conversion To/From Component Values
    Miscellaneous
    • Multiplexer
    • Demultiplexer
    • Latch
    • D-latch

    All comments and feedback are welcome. Enjoy!

    EDIT: Removed download, get them from here instead.
    Last edited by DuFace; 07-12-2008 at 05:07 AM. Reason: Removed download.

  2. #2
    Wirererer Wodden is on a distinguished road Wodden's Avatar
    Join Date
    Sep 2007
    Location
    Leipzig, Germany
    Posts
    195

    Default Re: Vector Gates

    Yay, Cool! Have a cookie
    I haven't tried yet but this rocks!
    I allways wanted to use the vector thrusters [VECTOR] input
    Last edited by Wodden; 06-29-2008 at 08:29 AM. Reason: can't type...


  3. #3
    I-STN Developer

    InfectiousFight is on a distinguished road InfectiousFight's Avatar
    Join Date
    Jun 2007
    Location
    Houston, TX
    Posts
    480

    Default Re: Vector Gates

    Mmm...the to/from gate will be useful. Just to note, the expression gate does support vectors internally, it can convert all sorts of numbers to vectors, add them, subtract them, rotate them, multiply them, all that jazz, and it can send vectors to other expression gates, as well. The problem with E-Gate version 1 is that for whatever reason it can't send vectors to other devices, so no vector thruster functionality. This will come in very handy!

  4. #4
    Lifetime Supporter DuFace is on a distinguished road DuFace's Avatar
    Join Date
    Aug 2007
    Posts
    210

    Default Re: Vector Gates

    Thanks for the comments guys, and I did very much enjoy my cookie.

    I know the Expression Gate has intrinsic vector support and I use it fairly often. Your comment reminded me that I uploaded the wrong version actually. I started making this on Friday and it was part of a 50+ gate mega pack but the other gates still need some work so I just copied the vector gates out of that source file into the one I uploaded. I missed four gates off the bottom that you might find handy:
    • Convert To/From E-Gate Vector
    • Convert Components To/From E-Gate Vector

    Granted the latter gates are a bit useless because you could just use another Expression Gate, but I suppose it could be useful for remote control vehicles. For example:
    • Expression Gate at base station gives out an E-Gate vector
    • Value sent over radio to vehicle
    • Vector Conversion Gate transforms from E-Gate Vector to [Vector]
    • [Vector] handed to vector thruster
    Or:
    • GPS on-board vehicle gives out world coordinates as components
    • Component Conversion Gate transforms into E-Gate vector
    • Value sent over radio
    • Expression Gate at base station receives a pre-packaged E-Gate vector.

    I've updated the initial post, hopefully this will be of a bit more use now!
    Last edited by DuFace; 07-12-2008 at 05:07 AM.

  5. #5
    That furred thing
    Black Phoenix will become famous soon enough Black Phoenix will become famous soon enough Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    2,743

    Default Re: Vector Gates

    Do you want this in svn?
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5


  6. #6
    Lifetime Supporter DuFace is on a distinguished road DuFace's Avatar
    Join Date
    Aug 2007
    Posts
    210

    Default Re: Vector Gates

    Sure why not? Hopefully some people will find it beneficial.
    Fields of Green

+ Reply to Thread

Similar Threads

  1. Entity Gates, Vector Gates, and other stuff
    By DuFace in forum Wiremod Addons
    Replies: 31
    Last Post: 01-10-2009, 12:04 PM
  2. Outputting a vector from expression to vector thruster
    By Paper Clip in forum Help & Support
    Replies: 2
    Last Post: 10-16-2008, 03:37 AM
  3. Vector gates are already there.
    By Azrael in forum Custom & Advanced Gates
    Replies: 3
    Last Post: 10-02-2008, 10:28 PM
  4. Advanced gates / Custom gates
    By IEF015 in forum Wiremod Website Chat
    Replies: 1
    Last Post: 07-22-2008, 01:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts