Closed Thread
Page 351 of 353 FirstFirst ... 251301341349350351352353 LastLast
Results 3,501 to 3,510 of 3521
Like Tree5Likes

Thread: Expression Gate 2

  1. #3501
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Expression Gate 2

    Pointless bump, and you're also completely wrong
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  2. #3502
    Wirererer Evac's Avatar
    Join Date
    Apr 2010
    Posts
    147

    Default Re: Expression Gate 2

    Quote Originally Posted by ufoslava View Post


    So there you have it... make your expression run every time value is changed.

    Also, toggle button changes the value the moment you press it, no matter if you hold it or not.
    Non-toggle button changes the value back the moment you release it.
    E2's run each time a value is changed in inputs (Unless specified other otherwise).
    Meaning, if you wire it up to a button and you press that button and then release it the E2 would have ran twice, due to 2 value changes (Highlighted them).
    An output is an output, the E2 don't know that it's wired to a button it only knows that it's getting a value and it has to run each time that value changes.

  3. #3503
    Wire Sofaking Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,946

    Default Re: Expression Gate 2

    Let's all stop bumping this ok

  4. #3504
    Wire Noob biltong's Avatar
    Join Date
    Apr 2010
    Posts
    25

    Default Re: Expression Gate 2

    Um, bump :P

    Where can I find the classes for findByClass? I had a thread yesterday but I can't remember it's name and I was using the in-game browser.

  5. #3505
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Expression Gate 2

    Quote Originally Posted by biltong View Post
    Um, bump :P

    Where can I find the classes for findByClass? I had a thread yesterday but I can't remember it's name and I was using the in-game browser.
    Code:
    E:type()
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  6. #3506
    Wire Noob biltong's Avatar
    Join Date
    Apr 2010
    Posts
    25

    Default Re: Expression Gate 2

    That's not what I meant Divran :P I mean when you use findByClass("") All the things that can go between the quotes.

  7. #3507
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Expression Gate 2

    Quote Originally Posted by biltong View Post
    That's not what I meant Divran :P I mean when you use findByClass("") All the things that can go between the quotes.
    That was the answer. Use type on entities to get their class, and then you know what to put in there to find that entity.
    EDIT: Or just look at the entity's folder name.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  8. #3508
    Wire Noob biltong's Avatar
    Join Date
    Apr 2010
    Posts
    25

    Default Re: Expression Gate 2

    I have to find the entity before I can use type() on it, which is why I need to know how to find it with findByClass. Right now my contraption uses findByClass("prop_*") but I also want it to find other entities like rpgs.

  9. #3509
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Expression Gate 2

    Quote Originally Posted by biltong View Post
    I have to find the entity before I can use type() on it
    No you don't.
    Code:
    @inputs E:entity
    print(E:type())
    The type RPGs is harder to get, but using this code:
    Code:
    @outputs R:array
    runOnTick(1)
    if (findCanQuery()) {
        findInSphere(entity():pos(),500)
        R=findToArray()
    }
    And then firing the RPG through this invisible sphere, I got "rpg_missile" (using Debugger tool on the E2).
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  10. #3510
    Wire Noob biltong's Avatar
    Join Date
    Apr 2010
    Posts
    25

    Default Re: Expression Gate 2

    Quote Originally Posted by Divran View Post
    No you don't.
    Code:
    @inputs E:entity
    print(E:type())
    The type RPGs is harder to get, but using this code:
    Code:
    @outputs R:array
    runOnTick(1)
    if (findCanQuery()) {
        findInSphere(entity():pos(),500)
        R=findToArray()
    }
    And then firing the RPG through this invisible sphere, I got "rpg_missile" (using Debugger tool on the E2).
    Thanks for the RPG code. I still don't get how using E:type() is going to help me if E has not been assigned an entity yet:
    Code:
    @persist E
    findByClass("prop_")
    E = findClosest(owner():pos())
    print(E:type())
    That makes sense to me because I know E is a prop, but this:
    Code:
    @persist E
    print(E:type())
    doesn't because nowhere do you tell it what E is. Get what I'm saying?

Closed Thread

LinkBacks (?)


Similar Threads

  1. Expression Gate : Can't save expression
    By m0nday in forum Bug Reports
    Replies: 2
    Last Post: 08-06-2008, 12:29 PM
  2. Gate - Expression -> Gone!
    By Qvazzler in forum Installation and Malfunctions Support
    Replies: 10
    Last Post: 05-25-2007, 10:26 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
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots