Rocket Pistol - help

Grab your favourite IDE and tinker with the innards of game engines

Rocket Pistol - help

Postby Cryatal on Tue Feb 08, 2011 2:31 pm

Hi, I'm fairly new to the source code and I'm just playing with weapons and ammo types at the moment.
Iv been trying to get the pistol to shoot rockets instead of standard bullets however:

Changing the ammo in the script folder doesn't seem to work,

Changing the model of the BoxSRound, LargeBoxSRound, BoxMRound etc. (don't quite understand the difference between these) in item_ammo.cpp to the rocket model doesn't work.

Iv tried creating a new ammo type with the rocket model but that doesn't want to work either.
Cryatal
Dumpling
Dumpling
 
Joined: Tue Feb 08, 2011 2:20 pm

Re: Rocket Pistol - help

Postby Garrador on Tue Feb 08, 2011 2:49 pm

Not quite sure what code you would need, but I think it's quite some more than changing the ammo type and such. Might be easier to change the viewmodel for the rocket launcher instead. Or, copy all the code from the rocket launcer, make a new weapon thats identical, and change it's viewmodel, if you want the original as well.
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: Rocket Pistol - help

Postby zombie@computer on Tue Feb 08, 2011 5:03 pm

Rockets are not like other ammo. Rockets are actual entities spawned in front of the rocketlauncher. Most ammo types are interchangeable, but rockets are not.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Rocket Pistol - help

Postby LordDz on Wed Feb 09, 2011 5:41 pm

Copy code for rpg, change the model and allow it to fire more than one rocket? (That can be done in the scripts).
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Return to Programming

Who is online

Users browsing this forum: No registered users