Welcome Back! Please login below. If you are not yet a member, why not register? Enjoy!

Join the forum, it's quick and easy

Welcome Back! Please login below. If you are not yet a member, why not register? Enjoy!

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Expression 31We have now opened a new Build server! IP: 188.165.193.102:27016Expression 31

5 posters

    Expression

    oskarso
    oskarso
    Elite Member
    Elite Member


    Number of posts : 439
    Age : 29
    Location : Over here
    In-Game Name : Badlands

    Credits Credits :
    Expression Left_bar_bleue2 / 1002 / 100Expression Right_bar_bleue

    Warnings! Warnings! :
    Expression Left_bar_bleue0 / 100 / 10Expression Right_bar_bleue

    Registration date : 2008-07-25
    Points : 267
    Reputation : 7

    Expression Empty Expression

    Post by oskarso Wed Sep 17, 2008 6:18 pm

    Right then im gonna show you the expression. As far as i know about the expression it aint all that hard to learn you might just need a few tips here and there and thats what im here for.

    Now when you take the expression tool click on new expression and then you will se a Label Input Output and Line 1-60.

    Im gonna start showing you the simplest of expressions like:

    Add.
    Inputs:A B
    Outputs:C
    Line1:C=A+B

    And there you have it. Thats an add gate.

    You can also make it divide, subtract, multiply as far as i know.
    Here are the signs for each of them:

    Divide=/
    So its C=A/B
    Subtract=-
    Multiply=*

    You can make other things like this:
    Inputs:A
    Outputs:B
    Line1:A==1 -> B=5;
    Line2:A==0 -> B=2;

    Right there you are saying it if the A input is 1 it should output B as a value of 5. And if A is 0 then output 2. And each line like that must always end with a ; not a : but a ; and it must not end with a ; if its a add or subtract or anything like that.

    Here is another thing you can do too.

    Inputs:Ranger
    Outputs:Fire
    Line1:Ranger>50 -> Fire=1;
    Line2:Ranger<50 -> Fire=0;

    There its simply if someone is farther than 50 from the ranger then the turret should fire but if its closer then it should not fire. The > and < are greater than and lessthan signs. Greather than is this > and Lessthan this <.

    And yeah i forgot the -> thing means like then. So like let me make it as i whould read an expression

    Line1:If A is 1 then B is 5;
    Line2:If A is 0 then B is 0;

    And no its just how i say it is when i am making expressions.

    And if you are making like if the button is this then this is that you must always have a == not a single = becouse if its a single = then you are telling it that it is that value but if its == then you are asking it.

    And the last thing i want to show you is a think i have just learned and that is concommand. Concommand is a thing that goes and says stuff to the console.

    Like so:

    Inputs:A
    Outputs:
    Line1:A -> concommand("kill");

    So there if you wire A to a button so everytime you push the button then it will kill the owner of the expression.

    You can also make expressions make you say stuff.

    Like so:

    Inputs:A
    Outputs:
    Line1:A -> concommand(' say This is how it works');

    And it must always end with a ;

    So thats all so far i might add more later when i feel like it. I hope this has helped you in becoming a wire god (im not one),
    Bam
    Bam
    Admin
    Admin


    Number of posts : 1952
    Age : 37
    Location : Hull, UK
    In-Game Name : [BS] Bam

    Credits Credits :
    Expression Left_bar_bleue100 / 100100 / 100Expression Right_bar_bleue

    Warnings! Warnings! :
    Expression Left_bar_bleue0 / 100 / 10Expression Right_bar_bleue

    Registration date : 2008-05-27
    Points : 1598
    Reputation : 76

    Expression Empty Re: Expression

    Post by Bam Wed Sep 17, 2008 6:21 pm

    Cool Oskar Smile I'll have to give it a try sometime!
    avatar
    _Twitch_
    Wire Pro
    Wire Pro


    Number of posts : 5
    Location : california
    In-Game Name : twitch

    Credits Credits :
    Expression Left_bar_bleue0 / 1000 / 100Expression Right_bar_bleue

    Warnings! Warnings! :
    Expression Left_bar_bleue0 / 100 / 10Expression Right_bar_bleue

    Registration date : 2008-09-17
    Points : 0
    Reputation : 0

    Expression Empty Re: Expression

    Post by _Twitch_ Thu Sep 18, 2008 1:09 am

    You can also do exponents and square roots, along with other mathematical functions..

    5^2 ~~ 5 to the second power = 25
    sqrt(25) ~~ square root of 25 = 5
    cos(1.23) ~~ cosine of 1.23
    oskarso
    oskarso
    Elite Member
    Elite Member


    Number of posts : 439
    Age : 29
    Location : Over here
    In-Game Name : Badlands

    Credits Credits :
    Expression Left_bar_bleue2 / 1002 / 100Expression Right_bar_bleue

    Warnings! Warnings! :
    Expression Left_bar_bleue0 / 100 / 10Expression Right_bar_bleue

    Registration date : 2008-07-25
    Points : 267
    Reputation : 7

    Expression Empty Re: Expression

    Post by oskarso Thu Sep 18, 2008 1:28 am

    _Twitch_ wrote:You can also do exponents and square roots, along with other mathematical functions..

    5^2 ~~ 5 to the second power = 25
    sqrt(25) ~~ square root of 25 = 5
    cos(1.23) ~~ cosine of 1.23

    Ok cool i did not know that.
    liam6478
    liam6478
    A Legend To The Server!
    A Legend To The Server!


    Number of posts : 693
    Age : 28
    Location : UK, bristol
    In-Game Name : LI4M

    Credits Credits :
    Expression Left_bar_bleue2 / 1002 / 100Expression Right_bar_bleue

    Warnings! Warnings! :
    Expression Left_bar_bleue0 / 100 / 10Expression Right_bar_bleue

    Registration date : 2008-05-27
    Points : 490
    Reputation : 8

    Expression Empty Re: Expression

    Post by liam6478 Thu Sep 18, 2008 6:02 pm

    to much information!
    cant take in *tchzs*
    can not compute
    shutting down...
    chargers5583
    chargers5583
    Elite Member
    Elite Member


    Number of posts : 473
    Age : 27
    Location : San Diego
    In-Game Name : [NBU&amp;amp;#1660;] (*BS*) Red Baron

    Credits Credits :
    Expression Left_bar_bleue0 / 1000 / 100Expression Right_bar_bleue

    Warnings! Warnings! :
    Expression Left_bar_bleue2 / 102 / 10Expression Right_bar_bleue

    Registration date : 2009-06-30
    Points : 577
    Reputation : 6

    Expression Empty Re: Expression

    Post by chargers5583 Tue Jun 30, 2009 4:30 am

    ahh but there is more than just that

    Sponsored content


    Expression Empty Re: Expression

    Post by Sponsored content


      Current date/time is Sat Apr 27, 2024 8:07 am