Re: Making guns shoot explosive projectiles
What's so hard about a Cannon?
The TDExplosive? The fragments?
Also, to Sithlordz... (This is a description of the dependencies Alenth mentioned)
When you're editing a weapon, look for this:
Code:
RoundCount = 3
RTTRatio = 0
RegularRound = Round
CopyOf = Round Cannon
TracerRound = None
This is found in the Magazine, which is usually in the same .ini as the weapon.
The "RegularRound" is the type of object that's being fired. It's always a 'Round'. The "CopyOf" is more important. That determines what 'Round' you're firing. In this example, it's the 'Round Cannon'.
Let's zoom over to the Round Cannon (it's in ammo.ini).
Code:
InstanceName = Round Cannon
ParticleCount = 1
Particle = TDExplosive
CopyOf = Frag Shell
Shell = MOSRotating
CopyOf = Cannon Casing
FireVelocity = 90
ShellVelocity = 10
Separation = 5
Most of these determine aspects about the round that are necessary for a weapon to know when it fires the round. What you're looking for is the "Particle". That determines the type of 'Particle' that will be fired. For the cannon, it's a 'TDExplosive'. Again, the "CopyOf" is more important, as it determines what 'TDExplosive' will be used when the Round is fired. In this case, it's the 'Frag Shell', the thing that you see when you fire the Flak Cannon in-game.
You can look for the Frag Shell in ammo.ini as well. It's a good example of a TDExplosive that detonates after a short time.
Warning, block o' text!To change what a weapon fires, you first make the Particle. If it's a bomb or grenade, it's a TDExplosive. If it's a bullet, it's an MOPixel. Other choices are MOSParticle and MOSRotating. Then you give the particle a unique "Instancename" (it's just a name, really). Then you make a round for it (give it a unique instancename), and set the Round's "Particle" to the type of Particle, and the "CopyOf" to the Particle's Instancename. Then you go to the weapon's Magazine, and set the "RegularRound" to the Round's instancename.
(TracerRounds are made the same way. Tracers fire once for every few times the regular round fires, as determined by RTTRatio.)