+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Basic Landmine, Regular Gates and E2

  1. #1
    Wire Sofaking singilli's Avatar
    Join Date
    Jun 2007
    Location
    Garšabęr, Iceland
    Posts
    498

    Post Basic Landmine, Regular Gates and E2

    Just added a video tutorial for this! [ame="http://www.youtube.com/watch?v=nl0vntURFFc"]YouTube - Enginn's tutorial #1 - Basic landmine (Gates and E2)[/ame]

    Pictures of finished products on bottom!

    Part 1 - Building the contraption (Regular gate style)

    1. First spawn a PHX 1x1 plate, freeze it.

    2. Place a "Speedometer" onto it, it is under Wire - Detection.

    3. Place an "Not equal" chip onto the plate, it is under Gate - Comparison.

    4. Place a "Constant value" on to the plate with 1 value and that value should be 0, it is under Wire - I/O.

    5. Place a wired "Button" onto the plate toggled with Value on: 1 and Value off: 0, it is under Wire - I/O.

    6. Place an "And (all)" chip onto the plate, it is under Gate - Logic.

    7. Place an "Explosive" and make sure the trigger value is at 1 other options are up to you, it is under Wire - Physics.

    8. If you got the weight tool then make the plate weigh 1000 that way it won't move when the Explosing goes off.

    Part 2 - Wiring it all up (Regular gate style)

    1. Wire the A input of the "Not equal" chip to the "Speedometer" Out ouput.

    2. Wire the B input of the "Not equal" chip to the "Constant value" of 0.

    3. Wire the A input of the "And (all)" chip to the "Not Equal" chip.

    4. Wire the B input of the "And (all)" chip to the "Button".

    5. Wire the Detonate input of the "Explosive" to the "And (all)" chip.

    Part 3 - Explaining how this works (Regular gate style)


    If the "Speedometer" is "Not equal" to 0, in other words if it is moving it will output 1. The "And (all)" chip then checks if both the "Not equal" chip and the Button are at 1, if both are the "And (all)" chip will output 1 and thus the "Explosive" detonates. The thing about the "And (all)" chip is if any of the inputs is not 1 it will output 0.

    ------------------------------------------------------------------------------

    Part 1 - Building the contraption (Expression style)

    1. First spawn a PHX 1x1 plate, freeze it.

    2. Place a "Speedometer" onto it, it is under Wire - Detection.

    3. Place a wired "Button" onto the plate toggled with Value on: 1 and Value off: 0, it is under Wire - I/O.

    4. Place an "Explosive" and make sure the trigger value is at 1 other options are up to you, it is under Wire - Physics.


    Part 2 - The expression 2

    [highlight=e2]@name Simple Landmine
    @inputs Button Speedometer
    @outputs Detonate
    @trigger all

    #If the speedometer does not equal 0 and the button is 1 then Detonate is 1
    if (Speedometer!=0 & Button) {Detonate=1}
    #else if one or both of the above are not equal to 1 Detonate is 0
    else {Detonate=0}[/highlight]

    Copy and paste the code and place the expression

    Part 3 - Wiring it all up (Expression style)

    1. Wire the "Speedometer" input of the expression to the "Speedometer".

    2. Wire the "Button" input of the expression to the "Button".

    3. Wire the Explosives "Detonate" to the "Detonate" output of the expression.

    Part 4 - Fundamentals of the expression 2

    @inputs Are variables that you feed to the expression, they are seperated with spaces and must always start with a capital letter.

    @outputs Is info the expression can feed to other chips and components, they are also seperated with spaces and must always start with a captial letter.

    @trigger all
    Makes everything trigger the expression to run it's code again, for example the button or the speedometer.

    # These are just comments to help you remember what certain parts do or help people in an easy way.

    if You might notice this, it makes the expression ask if what is inside the brackts () is true, if so run the code in the curly brackets {}. This is how you use if statements.

    else this makes it run if the above is not true, run the code in the curly brackets after the else.

    Part 5 - Better understanding of the expression used

    Line 1:
    [highlight=e2]if (Speedometer!=0 & Button) {Detonate=1}[/highlight]!= means not equal like the chip we used, and the 0 is the same as our constant value.

    A neet thing about the expression 2 is you don't have to type out the full code you can use short versions like to check if a variable is equal to 1 you just type in the name like I did with Button. If you would like to check if the Button is equal to 0 we simply type in !Button.

    And then in the curly brackets it sets Detonate to 1 thus the explosive explodes if both of those variables are true, that's why I used the & to check if both are equal to 1.

    Line 2:
    [highlight=e2]else {Detonate=0}[/highlight]This is pretty much straightforward, if the code in the line above is not true then execute the code in the curly brackets or in other words. If the Button is not at 1 or the Speedometer is not moving don't explode.

    ------------------------------------------------------------------------------

    This will not work if you freeze the prop, than it can't move and won't explode. Have fun, but remember don't spam this on servers or you might get banned. Playing in the corner is okay but don't be a minge and place this on the spawn of a map.

    -Thanks for reading!


    Last edited by singilli; 07-03-2009 at 03:15 PM. Reason: Making it neeter

  2. #2
    Wire Sofaking singilli's Avatar
    Join Date
    Jun 2007
    Location
    Garšabęr, Iceland
    Posts
    498

    Default Re: Basic Landmine, Regular Gates and E2

    Added video tutorial, reason for a bump.

  3. #3
    Developer Matte's Avatar
    Join Date
    Jan 2009
    Location
    Norway
    Posts
    3,109

    Default Re: Basic Landmine, Regular Gates and E2

    Speak up! I can hardly hear you in your video tutorial. Also you don't need a constant value of 0. All values are zero if you don't wire them up. You should also tell which gate logic you are using. I may have heard wrong, but I could only hear you say "gate - logic". The newbies wouldn't know which gate to pick in the logic tab.

    Other than that it looked good though. Good job!
    "If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
    -- Niels Bohr

  4. #4
    Wire Sofaking singilli's Avatar
    Join Date
    Jun 2007
    Location
    Garšabęr, Iceland
    Posts
    498

    Default Re: Basic Landmine, Regular Gates and E2

    Speak up! I can hardly hear you in your video tutorial. I just woke up when I recorded it I will remember this in my next tutorial.

    Also you don't need a constant value of 0. All values are zero if you don't wire them up. I only used regular chips for a short while and that was more than 2 years ago, so I might be a little rusty on them.

    You should also tell which gate logic you are using. I may have heard wrong, but I could only hear you say "gate - logic". The newbies wouldn't know which gate to pick in the logic tab.
    Yeah didn't notice that I just said "gate logi... gate logic, yeah", I'm adding an annotation for that.

  5. #5
    Wire Sofaking singilli's Avatar
    Join Date
    Jun 2007
    Location
    Garšabęr, Iceland
    Posts
    498

    Default Re: Basic Landmine, Regular Gates and E2

    Comments would be appreiated!

  6. #6
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,576

    Default Re: Basic Landmine, Regular Gates and E2

    You can make a "basic landmine" using a speedometer, an explosive, a constant value of 0.1 and a Greater Than. Wire A of the greater than to the speedo, B to the constant value, and Detonate of the explosive to the Greater than. Then whenever someone touches the land mine so that it is pushed a tiny little bit, it explodes.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

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

    Default Re: Basic Landmine, Regular Gates and E2

    That's basically what he already described.

  8. #8
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,576

    Default Re: Basic Landmine, Regular Gates and E2

    Quote Originally Posted by Lyinginbedmon View Post
    That's basically what he already described.
    Yes but when I saw "Basic" I thought as basic as possible, but he added an on/off button too
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

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

    Default Re: Basic Landmine, Regular Gates and E2

    It'd be kinda suicidal to try and plant a landmine that's always active

  10. #10
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,576

    Default Re: Basic Landmine, Regular Gates and E2

    Quote Originally Posted by Lyinginbedmon View Post
    It'd be kinda suicidal to try and plant a landmine that's always active
    Just use the physgun from a safe distance
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Entity Gates, Vector Gates, and other stuff
    By DuFace in forum Wiremod Addons & Coding
    Replies: 34
    Last Post: 07-28-2010, 12:49 PM
  2. Basic Calculator Using Gates Only
    By Masogir in forum Finished contraptions
    Replies: 15
    Last Post: 02-05-2009, 03:25 PM
  3. Need Some Not-So-Basic Help
    By DarthRogue in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 08-05-2008, 05:08 AM
  4. Advanced gates / Custom gates
    By IEF015 in forum Wiremod Website Chat
    Replies: 1
    Last Post: 07-22-2008, 02:04 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