+ Reply to Thread
Results 1 to 7 of 7

Thread: Wirelink Entity Question

  1. #1
    Wire Noob Coolflip's Avatar
    Join Date
    Mar 2008
    Posts
    27

    Question Wirelink Entity Question

    so, i have this code:

    Code:
    @name 
    @inputs E:entity
    @outputs V:vector Active FadeRate Fire
    @persist X:entity
    
    interval(10)
    
    V = E:shootPos() + E:eye() * 80
    Active=1, FadeRate=100
    R=random(0,255)
    G=random(0,255)
    B=random(0,255)
    Fire=random(0,1)
    X=XWL:entity()
    X:setColor(R,G,B)
    I am basically trying to set the color of the wirelink entity (a holo emitter) and i can't find out how i could combine the codes E:setColor(N,N,N) and XWL:entity(), i have tried setting a in chip variable thats an entity (X) to the one selected by wirelink, and than to change the color of the variable (X). But that failed horribly Any help would be appreciated

  2. #2
    Wire Sofaking SatansSimon's Avatar
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    513

    Default Re: Wirelink Entity Question

    im not sure but i think setColor stes the color of the expression-chip not anything else

  3. #3
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default Re: Wirelink Entity Question

    I'm assuming that code validates, because it does look good from at a first glance.
    However, E:setColor() is partly unusable (sorry for the bad documentation), it is limited to only your own entities, however, ownership in gmod doesn't really appear to be properly defined, thus, in most occassions it will not report you as the owner... so it will not do anything.

    So basically, E:setColor() doesn't really work right now.

  4. #4
    Wire Noob Coolflip's Avatar
    Join Date
    Mar 2008
    Posts
    27

    Default Re: Wirelink Entity Question

    damn

    ill just go back to using the colorer heh

    anyways, thanks for clarifying that

  5. #5
    Wirererer Hunter234564's Avatar
    Join Date
    Apr 2008
    Location
    Holland
    Posts
    225

    Default Re: Wirelink Entity Question

    Little tip on the Fire = random(1,0) part:
    You can use Fire = -Fire +1
    The random() method maybe sticks to <0.5 for 10 executions, while the other method constantly switches every execution.

  6. #6
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default Re: Wirelink Entity Question

    Quote Originally Posted by Hunter234564 View Post
    Little tip on the Fire = random(1,0) part:
    You can use Fire = -Fire +1
    The random() method maybe sticks to <0.5 for 10 executions, while the other method constantly switches every execution.
    Fire = !Fire

    is a better way

  7. #7
    Wire Tutor chinoto's Avatar
    Join Date
    Apr 2008
    Location
    Brooklyn Park, MN. Lost my thumbdrive yet again...
    Posts
    1,983

    Default Re: Wirelink Entity Question

    I haven't tested the functions myself, but you can now set the color of your entities using setColor.
    (\__/) Expression 2 Resources: E2 Beginner's Guide | E2 Formatting Guide | E2 Function Reference | E2 Examples | Me
    (='.'=) PM me code and I'll send it back optimized if possible. (I find it fun dammit!)
    (")_(") Drunkie referring to an E2: "It's obvious that Chinoto made this, his coding style is all over it."

+ Reply to Thread

Similar Threads

  1. Explain Wirelink?
    By grandpapolly in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 03-11-2009, 05:43 PM
  2. Wirelink - Multisend
    By turck3 in forum Ideas & Suggestions
    Replies: 7
    Last Post: 01-20-2009, 04:41 PM
  3. E2 wirelink
    By Split in forum Expression 2 Discussion & Help
    Replies: 3
    Last Post: 01-04-2009, 05:13 PM
  4. Egate2 Wirelink
    By Jarviar in forum Installation and Malfunctions Support
    Replies: 13
    Last Post: 12-28-2008, 11:49 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