+ Reply to Thread
Page 12 of 40 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 399

Thread: Expression Gate Documentation

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

    Default

    Okay.. how wold one make an internal clock which

    counted up to X if A is true, else it counts down to 0.[/b]
    Code:
    I@A X
    O@O
    interval(100)
    A -> O += 1;
    !A -> O -= 1;
    A = clamp(A, 0, X)

    oh yeah. Syn. SOmethign odd going on with the Mux Demux stuff. I had a script working fine and then added one more mux and demux into it and it stopped working right and just did stupid stuff like a never ending climbing number.[/b]
    How did you connect them, and did you use the new duplexer stuff? Mux and Demux is old stuff, although they do the same thing basically.

    What kind of a function is one you must put at the top?

    I mean, it would make sense if it was a function to initialize a system the other functions were dependent of, but it doesn't quite look like one to me.[/b]
    Well, that's kinda the stupid thing, interval does not schedule at an interval, it indentical to schedule, except for one thing:
    • Schedule(ms) removes any previously scheduled clock pulse
    • Interval(ms) keeps any previously scheduled clock pulses
    So, interval is merely a naming convention for a function that is similar to schedule, and I realize that it is stupid naming, but that was my thinking then. However, the name interval suggests that it is common for creating intervals, and that being said it doesn't have to be at the top to be useful, so the important thing is, interval does not pulse at intervals, it gives you the possibility to pulse at intervals. You could have an input that controls whether it should run the interval, hence you can write "A -> interval(20);", putting it at the top is simply if you want a static interval. And I've sometimes used interval instead of schedule in my scripts because it can simplify the code and vice versa.

  2. #112
    Wirererer CBBP's Avatar
    Join Date
    Apr 2007
    Posts
    201

    Default

    thanks for the timer Code Syn. Now to adapt it to my needs. I am not used to that -> logic syntax yet. Never really programmed anything before so I am new to this stuff haha.


    Umm.. I did it like...

    Code:
    O@ControlPack1O
    ControlPack1O = send(FO, BO, TRigO, TLefO, UpO, DowO, LRigO, LLefO)
    Code:
    I@ControlPack1I
    PitchFor = recv(ControlPack1I, 1)
    PitchBac = recv(ControlPack1I, 2)
    RollRig = recv(ControlPack1I, 7)
    RollLef = recv(ControlPack1I, 8)

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

    Default

    That is correct.

  4. #114
    Wirererer CBBP's Avatar
    Join Date
    Apr 2007
    Posts
    201

    Default

    mm maybe it was something that always wanted to break but I never noticed. it has been recoded and I think it works better anyway.

    PS. + OT: anyone know a good source recorder tut?

  5. #115
    Wirererer CBBP's Avatar
    Join Date
    Apr 2007
    Posts
    201

    Default

    Hey, Syn. In that pulser.. how come I can't do a -1 like this. I kind of want it so i don't need another line.

    Code:
    B = 1 
    A = (B ? -1 : 0) 
    Run -> Out += A;
    You would think this would make it subtract as it is adding -1s to Out but it does not it just does Out + 1 instead of Out + -1

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

    Default

    As you didn't paste the entire code it is hard to tell, but assuming there is no other code.
    It will always be 0 (or it should decrease by 1 each run).

  7. #117
    Wire Sofaking Shandolum's Avatar
    Join Date
    Apr 2007
    Location
    Europe -> Denmark
    Posts
    887

    Default

    I am having some problems with vecrotate(), when using normal constants I have no problems, but when using a variable that I have calculated before, it doesn't coop right.
    Here is app what I am doing:
    Code:
    V1=vector(X1-X2,Y1-Y2,0)
    V2=vector(1,1,0)
    NV=vecrotate(V2,0,vecyaw(V1),0)
    I'm not giving away what it is used for until its done.
    Is there a way to do this without vecrotate?
    I want to turn the V2 with V1's yaw.
    Everything can be improved upon. Nothing is Perfect.
    The only way to move forward, is to surpass what has already been done.
    Creator of many things.

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

    Default

    sin and cos should do it, but that should work like you've done it now, however I did notice that the rotation was kind of odd, or that I just misunderstood it. But as I said, sin and cos should be enough for such simple purposes.

  9. #119
    Wire Sofaking Shandolum's Avatar
    Join Date
    Apr 2007
    Location
    Europe -> Denmark
    Posts
    887

    Default

    Found the sinner in my expression, used some wrong words for V1, ups. Could happen to anybody.
    But the rotate works good now. Will soon have my creation up on the site.
    Everything can be improved upon. Nothing is Perfect.
    The only way to move forward, is to surpass what has already been done.
    Creator of many things.

  10. #120
    Wirererer undead82004's Avatar
    Join Date
    May 2007
    Location
    Fort Worth, Texas
    Posts
    320

    Default

    i could really use the clock thing on the gate if sumone could reword it
    You put the plug in the socket.
    ive got 2 tickets to paradise..in my pants.

+ Reply to Thread
Page 12 of 40 FirstFirst ... 2101112131422 ... LastLast

Similar Threads

  1. !!!OLD!!! Documentation of hi-speed devices
    By Black Phoenix in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 98
    Last Post: 02-10-2011, 07:41 PM
  2. !!!OLD!!! ZGPU Documentation
    By Black Phoenix in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 38
    Last Post: 11-29-2010, 04:54 PM
  3. !!!OLD!!! ZCPU Documentation
    By Black Phoenix in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 144
    Last Post: 09-05-2010, 03:46 AM
  4. Moongate Documentation
    By BlackNecro in forum Wiremod Addons & Coding
    Replies: 24
    Last Post: 04-22-2009, 01:32 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