+ Reply to Thread
Results 1 to 5 of 5

Thread: Stargate Auto Dialer Change Values

  1. #1
    Inactive meeces2911 is on a distinguished road meeces2911's Avatar
    Join Date
    Sep 2007
    Location
    New Zealand
    Posts
    22

    Question

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>N@Stargate Auto Dialer
    I@Button
    O@StargateWireInput StargateFastDial Gateaddress
    #if Button is wired and activated
    ~Button & Button ->
    #then dial gate
    schedule(100)
    StargateFastDial = 0;
    clk() ->
    Chevron += 1
    schedule(100)
    ;
    Chevron == 1 -> StargateWireInput = 69;
    Chevron == 2 -> StargateWireInput = 65;
    Chevron == 3 -> StargateWireInput = 82;
    Chevron == 4 -> StargateWireInput = 84;
    Chevron == 5 -> StargateWireInput = 72;
    Chevron == 6 -> StargateWireInput = 49;
    Chevron == 7 -> StargateFastDial = 1;
    Chevron == 8 -> schedule(0), Chevron = 0
    StargateWireInput = 0;
    Gateaddress = StargateWireInput
    </div>

    This is my code for my auto diarler, and i want to be able to change the destination to which this dials, WITHOUT changing the chip values... ie i need something that does this ...
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>
    N@Stargate Auto Dialer
    I@Button Panel
    O@StargateWireInput StargateFastDial Gateaddress
    #if Button is wired and activated
    ~Button & Button ->
    #then dial gate
    schedule(100)
    StargateFastDial = 0;
    clk() ->
    Chevron += 1
    schedule(100)
    ;
    Chevron == 1 -> StargateWireInput = Panel(values 1 and 2);
    Chevron == 2 -> StargateWireInput = Panel(values 3 and 4);
    Chevron == 3 -> StargateWireInput = Panel(values 5 and 6);
    Chevron == 4 -> StargateWireInput = Panel(values 7 and 8);
    Chevron == 5 -> StargateWireInput = Panel(values 9 and 10);
    Chevron == 6 -> StargateWireInput = Panel(values 11 and 12);
    Chevron == 7 -> StargateFastDial = 1;
    Chevron == 8 -> schedule(0), Chevron = 0
    StargateWireInput = 0;
    Gateaddress = StargateWireInput
    </div>

    For example say Panel = 696582847249 (EARTH1),
    then i want the dialer to only grab pairs of numbers at a time.
    ie. 69, then 65, then 82 ... etc.

    Is there anyway to store the values into an array, and then just get the first 2 values and then go onto the next ??

    Any help would be great!!!
    [url="http://page81.no-ip.org:27015"]http://page81hl2.no-ip.org[/url]
    This is my Gmod server, but i am not online very often...
    I need someone with some patience to test my server, so i can see if i have
    port forwarded right. Please Pm me if you wish to help :)

  2. #2
    Wirererer Riddler is on a distinguished road Riddler's Avatar
    Join Date
    Nov 2007
    Location
    Rapture
    Posts
    159

    Default

    humm...

    Well I have really got to go but il just throw an idea out there for some one elce to make or if I come back and no one has done it i'l do it

    but what about the keypad expresshion

    use $Keypad to see if it has chnaged and if it has changed make number 1 the address then incremnt a value eg

    Code:
    $Keypad & A == 0 -> Chevron1 = Keypad, A += 1;
    $Keypad & A == 1 -> Chevron1 = Keypad, A += 1;
    
    and so on (I never use delta in expreshions really so the way I used the delta might need a little tweeking

  3. #3
    Wire Dev - Lazy
    tomb332 has a spectacular aura about tomb332 has a spectacular aura about tomb332's Avatar
    Join Date
    Mar 2007
    Location
    Birmigham,UK
    Posts
    1,294

    Default

    if you use
    ~Keyboard then that tells you if the keyboard input was the one that triggered the expression gate to run this time.
    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

    Super Easy Wire Download

  4. #4
    Inactive meeces2911 is on a distinguished road meeces2911's Avatar
    Join Date
    Sep 2007
    Location
    New Zealand
    Posts
    22

    Default

    umnmm... ok ... i would prefer not to have a keyboard attached to it. I want to just choose an address from the panel, (under Wire I/O -- the thing with 8 different values you can assign to it), and push the dial button... BUT if i was to attach a keyboard to it ... what would i use to store the values of the keyboard.... because if i just wire the keyboard straight to the gate, then that rules out my autodialer chip in the first place does it not ??
    [url="http://page81.no-ip.org:27015"]http://page81hl2.no-ip.org[/url]
    This is my Gmod server, but i am not online very often...
    I need someone with some patience to test my server, so i can see if i have
    port forwarded right. Please Pm me if you wish to help :)

  5. #5
    Wirererer joeyjo0 is on a distinguished road joeyjo0's Avatar
    Join Date
    Sep 2007
    Posts
    172

    Default

    I don't think you can, since you can't check substrings, wiremod doesn't have strings.
    Quote Originally Posted by ITSBOT
    ITSBOT: jatgoodwin is epicly raped.
    Quote Originally Posted by Syranide
    The specifics is however.... very specific

+ Reply to Thread

Similar Threads

  1. Stargate Spammer/Auto Dialer
    By JonLeonTM in forum Custom & Advanced Gates
    Replies: 14
    Last Post: 08-13-2009, 10:19 AM
  2. Stargate Expression Dialer
    By Brian4120 in forum Custom & Advanced Gates
    Replies: 4
    Last Post: 11-20-2007, 03:05 PM
  3. Auto-Targeting, Auto-Firing Cruise missile launcher Tutorial.
    By Irish_Cereal in forum Wiremod Tutorials
    Replies: 18
    Last Post: 07-12-2007, 12:51 PM
  4. Auto-targeting, Auto-firing Cruise Missile Launcher Video
    By Irish_Cereal in forum Contraptions & Saves
    Replies: 12
    Last Post: 05-14-2007, 06:09 AM
  5. Auto-targeting, Auto-firing Cruise Missile Launcher. :p
    By Irish_Cereal in forum Wiremod General Chat
    Replies: 5
    Last Post: 05-10-2007, 03:26 PM

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