I'v been trying to add a new 'charged fire' mode to the laser weapons, but i cant seem to do it. It never shows up in game.
Here's my code:
// =======================
// LASER PISTOL
// =======================
item laserpistol
{
name "_Laser Pistol"
model weapons/laserpistol/laserpistol
weapon true
type pistol
animationindex 2
holdtwohanded false
firetwohanded false
shape "0 0 3 2"
center "2.5 0 1.2"
scale 1.7
ammo 26
reload 12
price 2000
size 10
is_secondary true
}
// =======================
// LASER RIFLE
// =======================
item laserrifle
{
name "_Laser Rifle"
model weapons/laserrifle/laserrifle
weapon true
type rifle
animationindex 1
holdtwohanded false
firetwohanded true
shape "0 0 5 1"
shape "0 1 4 1"
center "4.5 0 .5"
scale 1.26
ammo 16
reload 16
price 2500
size 35
is_primary true
}
// =======================
// HEAVY LASER
// =======================
item heavylaser
{
name "_Heavy Laser"
model weapons/laserheavy/laserheavy
weapon true
type biggun
animationindex 1
holdtwohanded false
firetwohanded true
shape "1 0 4 1"
shape "0 1 4 1"
center "8.5 4.5 3.5"
scale 1.15
ammo 6
reload 16
price 4000
size 50
is_primary true
is_heavy true
}
// =======================
// ELECTRO LASER
// =======================
item electrolaser
{
name "_Electro Laser"
model weapons/electrolaser/electrolaser
weapon true
type rifle
animationindex 1
holdtwohanded false
firetwohanded true
shape "0 0 5 1"
shape "0 1 4 1"
center "4.5 0 .5"
scale 1.26
ammo 16
reload 12
price 1000
size 35
is_primary true
}
item laser_ammo
{
name "_D-F Cartridge"
model weapons/laserrifle/laserrifle_clip
type ammo
animationindex 0
shape "0 0 1 2"
center "0 0 0"
scale 1.8
price 210
size 7
is_primary true
dmgtype laser
weapon_mod laserpistol
{
firedef
{
name "_Wave Fire"
skill close
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
speed 0
spread "0.75 0.75"
crouch 0.9
range 60
shots 1
ammo 1
time 5
damage "36 6"
dmgweight laser_light
reaction true
}
firedef
{
name "_Pulsed Fire"
skill close
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
delaybetweenshots 6
speed 0
spread "0.75 0.75"
crouch 0.9
range 60
shots 3
ammo 3
time 8
damage "36 6"
dmgweight laser_light
reaction true
}
firedef
{
name "_Charged fire"
skill assault
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
speed 0
spread "0.5 0.5"
crouch 0.8
range 120
shots 1
ammo 6
time 12
damage "42 8"
dmgweight laser_heavy
reaction true
}
}
weapon_mod laserrifle
{
firedef
{
name "_Wave Fire"
skill assault
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
speed 0
spread "0.5 0.5"
crouch 0.8
range 90
shots 1
ammo 2
time 7
damage "42 6"
dmgweight laser_medium
reaction true
}
firedef
{
name "_Pulsed Fire"
skill assault
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
delaybetweenshots 6
speed 0
spread "0.5 0.5"
crouch 0.8
range 90
shots 3
ammo 3
time 12
damage "42 5"
dmgweight laser_medium
reaction true
}
firedef
{
name "_Charged Fire"
skill Heavy
projtl laserOverload
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
speed 0
spread "0.5 0.5"
crouch 0.8
range 120
shots 1
ammo 6
time 16
damage "54 10"
dmgweight laser_heavy
reaction true
}
}
weapon_mod heavylaser
{
firedef
{
name "_Wave Fire"
skill heavy
projtl laserOverload
impact laserImpact
hitbody laserImpact
firesnd weapons/heavy_laser
speed 0
spread "0.5 0.5"
crouch 0.7
range 120
shots 1
ammo 1
time 10
damage "55 6"
dmgweight laser_heavy
reaction true
}
firedef
{
name "_Pulsed Fire"
skill heavy
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
delaybetweenshots 6
speed 0
spread "0.5 0.5"
crouch 0.7
range 120
shots 3
ammo 3
time 15
damage "52 6"
dmgweight laser_heavy
reaction true
}
firedef
{
name "_Charged Fire"
skill heavy
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
delaybetweenshots 6
speed 0
spread "0.5 0.5"
crouch 0.7
range 140
shots 1
ammo 4
time 18
damage "68 10"
dmgweight laser_heavy
reaction true
}
firedef
{
name "_OverCharged Fire"
skill heavy
projtl laserPulse
impact laserImpact
hitbody laserImpact
firesnd weapons/laser
delaybetweenshots 6
speed 0
spread "0.5 0.5"
crouch 0.7
range 140
shots 3
ammo 6
time 20
damage "70 10"
dmgweight laser_heavy
reaction true
}
}
weapon_mod electrolaser
{
firedef
{
name "_Stun Shot"
skill assault
projtl laserFrizzledBeam
impact laserFrizzledImpact
hitbody laserFrizzledImpact
firesnd weapons/electrolaser
speed 0
spread "0.8 0.8"
crouch 0.8
range 40
shots 1
ammo 1
time 7
damage "30 6"
dmgweight stun_electro
reaction true
}
}
}
What am I doing wrong? Am I missing something out? is there another file I need to edit?
Also, Any pointers on my attempt at a mod?
since I cant get it working, I cant test it out, so I don't know if my charged fire-mode's are WAY too powerful or not.
EDIT:
also, while I would have posted this thread in a coding related section of the forum, I intend to edit this post and put up my weapon 'mods' here under a new topic title.