Wire E2 Car Bomb

From GMod Wiki

Jump to: navigation, search



Contents

Wire E2 Car Bomb

Wire E2 Car Bomb: Wire E2 Car Bomb
Page white text.png Description:Creates a car bomb that will go off at a speed that you set.
link=User:Apocalypsefu Original Author:Apocalypsefu
Calendar.png Created:June 12, 2010
Page white text.png Notes:Youtube video http://www.youtube.com/watch?v=NRDlistFRgo


Build It

This is a very simple contraption to create and takes little time. First spawn or find the vehicle that you want to arm with a bomb. Next spawn a wire explosive (I would recommend a flat bomb) with any settings you would like and put it someplace under the vehicle making sure its welded to it. Next take out your E2 tool and spawn a chip with the following code.

@name Car Bomb
@outputs Detonate
interval(500)#Will run every half second to check when to blow up the bomb
Speed=toUnit("mph",entity():vel():length())#Calls a new variable called Speed to check the speed of the e2 chip
if (Speed >= 20) { #creates an if statement to check to see if the current speed is equal to or greater then 20 mph
  Detonate = 1 #If the condition returns true then it detonates the explosive
  selfDestruct() #And this code destroys the e2 chip so no evidence is left behind =D
}

So what this code does is checks every half second what the current speed of the e2 chip is and if it goes over 20 mph then it sets off the explosive killing the person and removing all evidence with the function selfDestruct()

Wire It

Simply wire the explosives 'Detonate' to the E2's 'Detonate'

Test It

Now either hop in your car and drive off or wait for someone to get in and watch them blow up!

Bonus!

For a different version of the E2 you can do this code

@name Car Bomb Speed Version
@outputs Detonate
@persist Arm
interval(500)
Speed=toUnit("mph",entity():vel():length())
if (Speed >= 20) {
  Arm = 1
}
if (Speed < 20 & Arm == 1) {
  Detonate = 1
  selfDestruct()
}

What this does is makes it so if the person goes over the target speed and then goes under another target speed they blow up just like the to movie Speed.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox