+ Reply to Thread
Results 1 to 3 of 3

Thread: Wired Defusable C4 (E2)

  1. #1
    Wire Noob Rad Hazard is on a distinguished road Rad Hazard's Avatar
    Join Date
    Nov 2008
    Location
    owner():pos()
    Posts
    13

    Post Wired Defusable C4 (E2)

    Here's something else I made in my spare time.

    My step-brother gave me the idea when he wanted me to make him a wired bomb that exploded after a certain time. I played around a bit more after I finished and came up with this:



    There are three types: (I only showed one in the video, others are the same except for the additions.)
    Normal: Normal C4 I showed in the video. Can be defused after activated. Can be turned on with "arm" button, but can't be turned on again.
    Sticky: Same as normal, but has a grabber on the bottom. Grabber can be activated/deactivated by "arm" button.
    Indicator: Same as normal. Has 3 hud indicators that display time left, defusal time left, and whether or not it's defused.

    Info:
    Detonation time on all three is 60s
    Time to defuse on all three is 10s
    Defusal time is automatically 1/6th of the detonation time.
    The beep and light go faster and faster as detonation time approaches

    Here's my E2 code. (Yes, I know that it could definately be optimised)
    Code:
    @name Defusable Timer
    @inputs Time On Defuse
    @outputs TimeLeft Boom DefuseLeft Defused Beep
    @persist A B On2
    
    interval(100)
    if (On) {
        On2 = 1
    }
    
    if (Time) {
        if (On2 & !Defused) {
            if (!A) {
                A = Time
            } else {
                A = A - 0.1
                TimeLeft = A
            }
            if (B <= 0) {
                B = 9 * (TimeLeft / Time)
                Beep = 1
            } else {
                B = B - 1
                Beep = 0
            }
        } else {
            TimeLeft = Time
            A = Time
        }
    } else {
        TimeLeft = 0
        A = 0
    }
    
    if (Defuse) {
        DefuseLeft = DefuseLeft - (60 / Time)
        if (DefuseLeft <= 0) {
            Defused = 1
        } else {
            Defused = 0
        }
    } else {
        DefuseLeft = 100
    }
    
    if (A <= 0 & On2 & !Defused) {
        Boom = 1
    } else {
        Boom = 0
    }
    
    Questions, Comments, Suggestions appriciated.
    Attached Files
    Last edited by Rad Hazard; 11-26-2008 at 02:28 PM.
    "In an all-out global thermonuclear war, nobody wins. Everybody dies"
    ~Unknown
    76.2847% of all signature statistics are made up on the spot.

  2. #2
    Wire Aficionado
    Beer is a jewel in the rough Beer is a jewel in the rough Beer is a jewel in the rough Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,378

    Default Re: Wired Defusable C4 (E2)

    Cool

    You should add a HUD indicator to it that sticks a progress bar on your screen showing diffusal progress.

  3. #3
    Wire Noob Rad Hazard is on a distinguished road Rad Hazard's Avatar
    Join Date
    Nov 2008
    Location
    owner():pos()
    Posts
    13

    Default Re: Wired Defusable C4 (E2)

    Actually, the indicater version already has that. I didn't show it in the video because sorce recorder wasn't playing nice and i got bunch of lua errors when I spawned it.
    "In an all-out global thermonuclear war, nobody wins. Everybody dies"
    ~Unknown
    76.2847% of all signature statistics are made up on the spot.

+ Reply to Thread

Similar Threads

  1. Jetpack + Defusable Bomb
    By turck3 in forum Finished contraptions
    Replies: 5
    Last Post: 02-14-2008, 04:57 PM
  2. Wired Thrusters & Wired Wheels don't Attach
    By bremez in forum Technical Support
    Replies: 1
    Last Post: 07-25-2007, 10:09 AM
  3. Wired Nailgun and Wired Welder Sent. Also a few others.
    By wabash in forum Ideas & Suggestions
    Replies: 7
    Last Post: 03-23-2007, 12:03 PM
  4. Wired Wheel vs. Wired Hydraulic
    By Kodin in forum Ideas & Suggestions
    Replies: 0
    Last Post: 03-02-2007, 06:32 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