RPG-7 SWEP

Hey there! RPG-7 SWEPs have been done numerous times, but I still wanted to create one that would suit all my needs.

Features:
- 4 missile modes:
* Manual (100% speed)
* Heat-seeking (87% speed)
* Laser-guided (75% speed)
* Position-marked (87% speed)

**- Custom particle effects for explosions and rocket trails**
- Custom viewmodel (not by me)
- Fully compatible both in singleplayer and multiplayer
**- Missiles unweld/unrope/etc. physical objects and send them flying away from the explosion**
- Missiles run out of fuel in 6 seconds
- While the missile still has fuel, it emits light and creates particle effects
- Realistic missile speed (115 meters/second = 4528 units/second)

Missile modes:
- Manual:
+ 100% speed
+ Can reload after firing out a missile
- Missiles are affected by gravity
- Fired out missiles have an offset

**- Heat-seeking:**
	+ Can reload after firing out a missile
	+ Not affected by gravity, if it locks onto a target
	- 87% speed
	- Missiles do not distinguish between friend or foe
	- A Heat-seeking missile will always fly after another rocket, even if there are living beings nearby
	- Fired out missiles have an offset unless the missile finds a target
	
**- Laser-guided:**
	+ Missiles are not affected by gravity
	+ Clicking your primary attack button after firing out a missile lets you turn off ignition on the rocket, turning it into an artillery shell
	+ Not affected by gravity
	- 75% speed
	- Can reload only if there are no active missiles fired out by the owner
	- Moving around causes the missile to twitch
	
**- Position-marked:**
	+ Flies towards the position you marked
	+ Not affected by gravity, if a position has been marked
	- 87% speed
	- Fired out missiles without a marked position have an offset

Controls:
PRIMARY ATTACK - fire out missile
SECONDARY ATTACK - aim down the sights
RELOAD BUTTON - reload weapon
USE + PRIMARY ATTACK - cycle through missile modes

Videos:

Known bugs:

  • The laser pointer looks weird when reloading.

You can get it here:

Suggestions/bug reports are welcome.

I’m getting a glitch where only a few feet away from me the rocket blows up before it can even go anywhere.

[editline]18th October 2011[/editline]

Apparently it’s only in gm_bigcity because it worked fine in gm_construct.

Could you make these into multiple models? Say an AT4? or a SMAW?

I’m not sure if there are any models for them.

I love this, Best RPG swep on GarrysMod.org

There aren’t any models like that.

[editline]19th October 2011[/editline]

Well that’s weird.

Alright, guys, I’ve figured out what’s wrong with gm_bigcity and the rockets, and I’m working on a fix.

Edit: Fixed and released!

http://www.garrysmod.org/img/?t=dll&id=125958

Edit 2: I’ve added in another missile mode, Position-marked.

Using this missile mode you can set the position to where you want the missile to fly to by pressing your secondary attack button. If you don’t set the position, then it will just behave like a missile launched in Manual missile mode.

This’ll be in 1.2.

This is so awesome. I’d love to see a C4 SWEP that does the same thing (perhaps with a fancy effect of its own), considering there’s no proper ones anymore. You seem to be the only reliable SWEP author now.

e: Also, does position mark work as a static position, or if you target something and it moves, will it still go after it?

I noticed you fixed the heat seeking missile’s detection. Thank you so much. :slight_smile:

the turning seems a bit sharp.

is there any chance of dodging/avoiding it?

Yes. Get to cover. Other than that, I’ll decrease sharpness.

[editline]21st October 2011[/editline]

The position is static. I was going to add in entity tracking, but then I figured that it would be a much better, easier to use and cheaper version of Heat-seeking missiles.

Edit: Any features you guys would like to be added in 1.2?

Well, if you are going to make the turning less sharp, could the tracking range be a little larger (1.5x the size or so)? It’s almost useless against vehicles, especially ones at range, because it never seems to pick up on them. But if it does, there’s generally no evading it because it instantly turns to them.

I was also wondering if you could also change it so that the RPG doesn’t unweld things that exceed a certain weight or size. This thing has been sending zeppelins crashing to the ground after a single hit.

I believe Dav0r made the model.

About the tracking range - no. I’ll just increase the cone of scan range.

About the weight - sure. But why wouldn’t a zeppelin get downed after a single shot?

It’s a massive flying goliath of epic proportions. Considering it is wooden after all, it probably would go down due to a fire, but still, it’s meant to be an Ace Combat-style superweapon- can’t kill it unless you take out its hotspots (supports and crew). The file’s here if you want to see how big it is/how much it weighs.

http://www.garrysmod.org/img/?t=dll&id=125790

And yeah, cone of scan range is what I meant. Great to hear. :slight_smile:

About that C4 suggestion I made- what about it? I was thinking you might be able to make it have different “modes” like this RPG does. A proximity mine mode, maybe, then a remote detonate, and a timed mode.

I still think you should get a better model.

Got any suggestions?

http://www.facepunch.com/avatar/238542.png?garryis=awesome

Nope.

Chuck Testa.

Anyways, here, have version 1.2:

http://www.garrysmod.org/img/?t=dll&id=126112

1.2:

  • Added in a new missile mode - Position-marked:
  • To use it, select it, look somewhere, and press your secondary attack button. After that, you should hear a beep sound and you can fire. If you do not set the position, it will just behave like in Manual missile mode.
  • Pressing your RELOAD KEY with a loaded RPG-7 will clear the marked position
  • Missiles in this mode have an arm time of 0.2 second
  • Added in a bit of description for each missile mode on the missile mode display bar

/\ Improved the unweld/unrope/etc. feature:

  • Now props will unfreeze, unweld, etc. only if the prop receives enough explosive force from the rockets
  • So, if a prop’s weight is 600, it’ll need to get hit by 2 rockets in order to unfreeze, unweld, etc. and to fly away from the explosion
  • Velocity added to props is now also dependent on their weight - heavier props fly less distance

/\ Now you won’t be able to fire out a missile if you’re facing a wall
/\ Increased the distance away from the player that the missile gets fired from by 5 units
/\ Fixed the explosion effect not getting precached
/\ Increased cone of check on heat-seeking missiles

Maybe you should make “Manual” the position-mark mode, since you “manually” mark the position (lol) and if it’s not marked it just fires like normal. Then you can keep it so there’s not too many things being switched through- easy selection and stuff. Nitpicking really :stuck_out_tongue:

I like the new mechanic for unwelding and unfreezing but I foresee tweaking in the weights.

This thing is so cool.

Thanks to Kogitsune, I now know how to increase amount of thinks per missile. Right now it’s 10 thinks per second, I’m gonna increase it to 30 thinks per second, which will greatly improve it’s turning smoothness, reaction time, etc.