Page 1 of 1
Weapon Question...
Posted: Fri Jul 11, 2008 7:02 pm
by metal_head
in my game you start with something like a knife,that you find a pistol and that you find another pistol.I made the pistol weapon and a double pistol weapon for when you find the other pistol,but I have a question.The double pistol weapon uses the same projectile as the pistol and it will cost 2 ammo per shot,so if I havelets say 100 bullets and shoot with the pistol let's say 3 bullets and than switch to double pistol,in the double pistol I'll have 97 bullets.OK,but how can I make it more powerfull when the double pistol will use the same projectile as the pistol.
So my question is how can I make a weapon more powerfull when it's using a projectile which other weapon uses.
Re: Weapon Question...
Posted: Fri Jul 11, 2008 7:35 pm
by Juutis
Well, the only way I can think of is using the altattribute feature of weapons. Each weapon can have two attributes that it damages and each projectile can have two different damages: one for the primary attribute and one for the alternative attribute. The alternative attribute is damaged only if the primary attribute is zero or doesn't exist. So, in the projectile definition add:
Then in the weapon definition of the single pistol:
And dual pistols:
(leaving the attributes blank may not work. So if you have problems try typing anything there. Doesn't matter what as long as it's not 'health')
That should do the trick.
On the other hand, why not use two different projectiles?
Re: Weapon Question...
Posted: Fri Jul 11, 2008 8:02 pm
by metal_head
WOW,Thanks that was very simple(and I was thinking of a scripted weapon) silly me.
Well I don't want to use different proectiles,because I want the double pistols and the pistol to share one ammonition ammount.I mean fro example I shoot with the pistol and I have 40 bullets left,than I switch to the double pistols and have 40 bullets.than shoot with the pistols and have 20 bullets left,switch to the pistol and have 20 bullets.
That's because both the weapons will use one kind of ammonition

.
See? The pistols are the same

.
Pistol.

Dual Pistol

Re: Weapon Question...
Posted: Fri Jul 11, 2008 8:07 pm
by Juutis
Ammo attribute != projectile.
projectile - the name of the projectile to fire (Projectile weapon only)
ammunition - name of the ammunition required by the weapon
So you could give the single pistol:
Code: Select all
projectile = 9mm_projectile
ammunition = 9mm
And the dual pistols:
Code: Select all
projectile = 9mm_projectile_2
ammunition = 9mm
And wham, we have two weapons that use the same ammo attribute but fire different projectiles.

Re: Weapon Question...
Posted: Fri Jul 11, 2008 8:24 pm
by metal_head
OMG I should star looking more carefuly...
