Adding/replacing weapons; how to force them into maps
Posted: Fri Oct 14, 2005 9:12 pm
I've been working on a small mod lately that: removes the plasmagun and railgun and replaces them with a "super nailgun" and "super shotgun". I've already coded both of these weapons into both game and cgame so that they function and can be received with the give command. The problem that I'm facing now is how to get them into currently existing maps, specifically the id maps, without having to re-distribute them (obviously because that's illegal and also because it's dumb). How can I do this? Is there some way that I can tell the game that when it finds say "wp_plasmagun" when loading the map to replace it with another weapon?
edit: I noticed one more thing. Once the rocket launcher is picked up, using the nextweapon command will allow the player to select an "invisible weapon." What I mean is that the hud selection box that shows which weapon is currently selected while you're switching through weapons, it moves to a nonexisting weapon past the last visible icon so that it's hovering over nothing, though both visually and in terms of gameplay you will still have the last valid weapon. Example: if the rocket launcher if the last valid weapon, once the non existant weapon is selected, the rocket launcher model is still displayed, rockets are still fired, rocket ammo is still subtracted, etc. Anyone know what's causing this and what I should do to fix it?
in case it helps, the current weapon list (in order):
gauntlet
nailgun (renamed machinegun)
super nailgun (variant of machinegun)
shotgun
super shotgun (variant of shotgun)
grenade launcher
rocket launcher
lightning gun
bfg
edit: I noticed one more thing. Once the rocket launcher is picked up, using the nextweapon command will allow the player to select an "invisible weapon." What I mean is that the hud selection box that shows which weapon is currently selected while you're switching through weapons, it moves to a nonexisting weapon past the last visible icon so that it's hovering over nothing, though both visually and in terms of gameplay you will still have the last valid weapon. Example: if the rocket launcher if the last valid weapon, once the non existant weapon is selected, the rocket launcher model is still displayed, rockets are still fired, rocket ammo is still subtracted, etc. Anyone know what's causing this and what I should do to fix it?
in case it helps, the current weapon list (in order):
gauntlet
nailgun (renamed machinegun)
super nailgun (variant of machinegun)
shotgun
super shotgun (variant of shotgun)
grenade launcher
rocket launcher
lightning gun
bfg