Wire missile

From GMod Wiki

Jump to: navigation, search

Contents

Information

Before I begin, I should state that I drew the original concept from this[[1]] tutorial. In fact the only difference is that this missile is SLIGHTLY more complex and will track players automatically.

In this tutorial I will show you how to create a player tracking wired missile. This will work on multi-player servers although I wouldn't recommend using it on anyone who isn't acting like a Mingebag unless you want to be swiftly kicked.

Now on with the tutorial...



Player Seeking Missile

Wire missile: Player Seeking Missile
Page white text.png Description:A missile which will automatically fly towards any player, NPC, prop etc...
link=User:K3z Original Author:K3z
Calendar.png Created:April 6th, 2009
Page white text.png Notes:Requires Wiremod (ofc...), PHX and the weight tool is useful


Construction

Step 1: Create the prop which you want as your missile. Ideally it should be something which explodes quite easily on impact (although any prop works) so for this tutorial I will be using the PHX amraam missile.

Step 2: Now add a Beacon Sensor with the following settings:

Split X, Y, Z Output world position (gps cords)

to the front of the missile (as shown in the image below):

gmflatgrass0039.jpg

Step 3: Add a target finder with the following settings to the top of your missile/prop

Minimum range: 1

Maximum range: 10000

Max number of targets to track: 1 (must be more for multiplayer use)

Max number of bogeys: 1

Target Players

Do not target owner (unless you want it to kill you)

Target NPCs

Target RPGs (these are cracking to try and take out with this missile)

Paint target

Steam ID filter (put in a steamID if you want it to home in on anyone in particular)


Put this somewhere near the middle of the rocket as in the following image:

gmflatgrass0041.jpg

Step 4: Add a GPS somewhere on the side of the missile (position doesn't really matter)

Step 5: Add a Vector Thruster with the following settings to the FRONT of the prop/missile (putting it on the back leads to a missile which flies back first into the target so isn't good for explosions):

Effect can be whatever you want (I like fire and smoke myself)

Set force multiplier to 10000 (nobody likes slow missiles)

Force minimum: 0

Force maximum: 10000

Bi-Directional

Enable Sound (up to you)

Works out of water

Works under water

xyz World (this is CRUCIAL)

Like I said put this on the front of the missile as in the picture below:

gmflatgrass0044.jpg

Step 6: Now add 3 Gates - all arithmetic set to subtract to one side of the rocket in a row.

Step 7: Now add a Numpad Input with the following settings to the top of the missile:

Key: 1 (can be anything you want, this will be the button to enable the missile)

Toggle (so you don't have to hold the key down)

Value On: 1

Value Off: 0


The missile so far is shown in the picture below:

gmflatgrass0047i.jpg

Step 8: Now add a Detonator with the damage set to 200, to the back of the missile (this will make our abort system in case it's heading for the wrong person/doesn't detonate on impact).

Step 9: Add another numpad input near to the detonator with the following settings:

Key: 2 (can be anything you want except the launch missile key, this will be the button to detonate/destroy the missile)

Toggle (so you don't have to hold the key down)

Value On: 1

Value Off: 0

The updated missile is in the following picture:

gmflatgrass0050.jpg

Step 10: To make wiring easier use the namer tool to name one of the Subtract gates X, the other Y and the final one Z.

Step 11: Using the weight tool change the weight of the missile prop to a much lower value (in the example I used a weight of 5)


Wiring

1: Wire Mul on the vector thruster to the first numpad input (in the example it was set to 1)

2: Wire the beacon sensor to the Target Finder's output 1

3: Wire A on the X subtract gates to the GPS X

4: Wire A on the Y subtract gates to the GPS Y

5: Wire A on the Z subtract gates to the GPS Z

6: Wire B on the X subtract gate to the Beacon Sensor World_X

7: Wire B on the Y subtract gate to the Beacon Sensor World_Y

8: Wire B on the Z subtract gate to the Beacon Sensor World_Z

9: Wire X on the vector thruster to the X subtract gate

10: Wire Y on the vector thruster to the Y subtract gate

11: Wire Z on the vector thruster to the Z subtract gate

12: Finally, wire Trigger on the detonator to the second numpad input.

Once the wiring is done, your missile should look like this:

gmflatgrass0056.jpg

Usage

Unfreeze the missile and spawn an NPC etc. which will trigger the Target Finder (the target should be painted red or whatever colour the paint is set to)

Once your target has been acquired press your enable numpad key (if you followed the example exactly it is 1)

Watch with joy as your target is homed in on and destroyed

Sometimes, (especially if the target is in the air) the missile may not explode on impact, to fix this simply wait until the missile is near to the target and press your detonate key (in the example this was set to 2)

Here is a picture of mine in action:

gmflatgrass0058.jpg


Expansions/Improvements

As hard as it is to believe, there are ways to improve this amazing missile! Here are a couple to get you started with modification and improvement. They only have basic instruction on how to add them, I will leave you to figure the rest out.

1: Add a camera onto the missile. Spawn a camera, Weld it to the top of the missile (make sure you get a good view), set the weight of it to 1 (every little counts) and then, if desired set its material to make it invisible. This is a great addon and allows you to get wicked cool views like this:

gmflatgrass0061n.jpg

Although a keep upright constraint may have improved this image further...

2: Add another couple of vector thrusters with the same settings and in the same area of the prop for extra speed. This is a must if you are hoping of taking down RPGs and players in turbo charged vehicles. Simply wire them the same as the first one for extra fun...

3: Use different props. The PHX torpedo works really well and if anything is easier to build upon because of its larger surface area

4: Create warheads out of this device for some hilarious missiles. Simply no collide this missile with any prop, put it inside (make sure the front/explosive bit of it pokes out) weld it here and then make the missile itself invisible to create deadly bathtubs or whatever else floats your boat (just remember to seriously lower the weight of the props to <10

5: Add a ranger on the front and link this to the explosives so that it explodes when close(this makes it easier to hit air vehicles)

6: make the whole missile invisible so that a player gets killed by a seemingly random explosion(perhaps kill yourself to make you seem more innocent)

Well I hope this helped you with making this particular device. More tutorials on wire etc. from me coming soon <3


!!!!!!!!edit!!!!!!!:attach a thruster (normal) on the bottom (power 100000 or something high) attached to a different numpad number, then aim it up, press the number for norm thruster, wait a second, then press button for vect thruster, so it won't just fly along the ground. stop the norm thruster for improved agility(i.e. for manhacks, scanners, rpgs.)

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox