|
Author Topic:   Sniper Rifle
Tank target
Member
posted March 03, 2005 09:31 AM         
Yeah I'm working on this mod and need help to achieve my objective. Which is to modify the R-Grenenade launcher's nozzle to be six time longer than before. And to make it shoot a long red beam of energy whih will destroy a tank in a single shot. And for it to have a guiding laser like Mass Driver and a slower reloading rate than the plasma cannon.

IP:

Vlad
Member
posted March 03, 2005 10:23 AM            
Well, all that stuff's pretty easy to do, actually. Is there a particular part that you're having trouble doing?

You can't really just extend the barrel of the R-Grenade without editing the model itself, or making a new one. If you want to stick with just doing it in ents, you'll need to use the ScaleMatrix parameter. ScaleMatrix works for pretty much any mesh-based entity, and can distort it along any of the three axis.

A typical use of ScaleMatrix looks something like this...

scalematrix = 1, 2, 5

What that means is that the mesh's width won't be changed, it will be twice as tall and five times as long.

For your idea, you want to make the last value (the value of stretch along the model's Z axis) the highest. Something like 2, 2, 6 works pretty good for what you're trying. Just play around with the values and see what you like. And just to be clear, the ScaleMatrix command goes into the Weapon entitiy file.

One thing to keep in mind about ScaleMatrix is that, unfortunately, it extends in both directions, so you can't just make the thing longer in one direction or anything.

For the laser coming from the weapon, just take a look at how the Mass Driver's Weapon ent does it. You can pretty much just reuse the same code, with a few changes to the coordinates.

The projectile itself sounds like it's just a copy of the stock Laser with a different texture.


IP: