+ Reply to Thread
Results 1 to 3 of 3

Thread: Plasma weapon help

  1. #1
    Wirererer Teddypimm's Avatar
    Join Date
    Apr 2009
    Location
    England
    Posts
    122

    Default Plasma weapon help

    I am trying to make plans for a plasma weapon which fires for so long and then wont fire for some time.

    So far I got the timer to reset when the timer floored is > 240 but I want the timer to stop running when it resets and be able to run again and also want the time not to be effected while the timer is running and be effected when the timer resets and stops running.

    I have the firing and cool down system planed.
    I am za geek on za computer

  2. #2
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Plasma weapon help

    Quote Originally Posted by Teddypimm View Post
    So far I got the timer to reset when the timer floored is > 240 but I want the timer to stop running when it resets and be able to run again and also want the time not to be effected while the timer is running and be effected when the timer resets and stops running.
    Need syntax, preferably from the English language.

    It seems as though what you want is two counters, one for the plasma firing and the other for seeing how long the weapon is out of commission.

    So while firing, run something like this:[highlight=E2]interval(1000)
    WepOn += 1[/highlight]Then when WepOn equals you target firing time (In seconds in this case, reduce the interval to make it faster), the weapon turns off and the second timer kicks in. The second is identical but the On code is made to disable firing when it isn't done.

    To simplify:
    • WepOn starts at 0; WepOff starts at (We'll say) 300, so the weapon can fire
    • The weapon is fired, WepOn starts counting up
    • When WepOn equals 240, the weapon stops firing, WepOff sets to 0, and the WepOff counter starts
    • Because WepOff isn't 300, the weapon can't fire
    • WepOff equals 300 again, WepOn is set to 0, the weapon can fire

    The Olympus Technologies drones, totally not SkyNet in Gmod form.
    Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
    The gBrain Project, the drone controls system that thinks it's better than you

  3. #3
    Wirererer Teddypimm's Avatar
    Join Date
    Apr 2009
    Location
    England
    Posts
    122

    Default Re: Plasma weapon help

    I just worked it out, from some door plans. :mellow:

    Code:
    Or (a) -> Button ( non toggled )
    Or (b) -> = gate
    Toggle (clk) -> Or 
    Toggle (off) -> Value (1)
    Toggle (on) -> Value (0)
    Timer (run) -> Toggle
    Timer (reset) -> = gate
    = gate (a) -> Floor
    = gate (b) -> 240
    Floor -> Timer
    I am za geek on za computer

+ Reply to Thread

Similar Threads

  1. Plasma screen graphics tablet broken
    By Tolyzor in forum Bug Reports
    Replies: 3
    Last Post: 04-13-2009, 02:09 PM
  2. Wired screen: Plasma TV error
    By BlackholeWM in forum Bug Reports
    Replies: 15
    Last Post: 01-10-2009, 02:40 PM
  3. Lua editing-weapon-Need help
    By BlackholeWM in forum Off-Topic
    Replies: 2
    Last Post: 12-21-2008, 07:50 AM
  4. Wired Plasma and LCD screen problem
    By Me101 in forum Installation and Malfunctions Support
    Replies: 7
    Last Post: 07-24-2007, 06:44 PM
  5. Problem with Plasma TV Screen
    By penguini in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 06-01-2007, 10:03 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
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots