Weapon stripping

fyre

L1: Registered
Mar 15, 2008
9
0
I'm starting on a melee map, but I can't figure out a good way to remove the non-melee weapons. I found this tutorial on fpsbanana, but it constantly enables and disables sv_cheats, which is quite annoying. I've seen melee maps that don't cycle cheats on and off, so I know there must be another way. Does anyone know of any other tutorials or anything?
 

xgloryx

L1: Registered
Feb 26, 2008
21
2
Quoted from a post on balls_soccer on FPSB...

...you don't need sv_cheats spam to kill the weapons, you can just kill them directly (IT's much better, no spam at all)

For example:

Change:
servercommand,Command,sv_cheats 1;ent_remove_all tf_weapon_minigun


To:
"OnTrigger" "tf_weapon_minigun,Kill,,0,-1"
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
Yes, you can send all of the non-melee weapons a "Kill" input to disable them. You should then not have any func_regenerate (resupply lockers) in your map because they will restore the weapons. If you are triggering the weapon removal with a trigger_multiple's StartTouch in the spawnroom keep in mind that if a player is in the trigger and changes class to respawn, it will not fire the StartTouch again.
 

lerlerson

L2: Junior Member
Nov 27, 2007
75
7
Hey, just an odd question, will this kill the weapons from the entire map, or just effect people in the trigger_multiple area?

For example, what I need to do (well not me, actually) is have all weapons but melee cut from one specific area, a jail cell.
 

dirtyminuth

L5: Dapper Member
Nov 5, 2007
221
15
Hey, just an odd question, will this kill the weapons from the entire map, or just effect people in the trigger_multiple area?

For example, what I need to do (well not me, actually) is have all weapons but melee cut from one specific area, a jail cell.

I don't think it's possible unless someone has been holding out.

I've tried numerous ways to accomplish player-specific weapon removal, and have not been able to. This includes a whole number of point_clientcommands, servercommands, weapon kill commands, and the like.
 

lerlerson

L2: Junior Member
Nov 27, 2007
75
7
I don't think it's possible unless someone has been holding out.

I've tried numerous ways to accomplish player-specific weapon removal, and have not been able to. This includes a whole number of point_clientcommands, servercommands, weapon kill commands, and the like.

Well, it's been said that if you go back into a func_resupply, you get the weapons back. Theoretically, could you make it so that where the player_spawn nodes are, they're close enough to automatically activate a resupply, so every time you spawn your weapons are restored, but when you're sent to the area that I need them to lose their weapons, they lose them? I mean, they DO go to that area when they respawn after death, so...?
 

dirtyminuth

L5: Dapper Member
Nov 5, 2007
221
15
Well, it's been said that if you go back into a func_resupply, you get the weapons back. Theoretically, could you make it so that where the player_spawn nodes are, they're close enough to automatically activate a resupply, so every time you spawn your weapons are restored, but when you're sent to the area that I need them to lose their weapons, they lose them? I mean, they DO go to that area when they respawn after death, so...?

I've experienced this: Whenever any command to kill a weapon is fired (via any method I've tried), all weapons in the map are targeted, meaning all players will lose the specified weapon, regardless of location.
 
Last edited:

Koei

L4: Comfortable Member
Feb 23, 2008
186
4
Melee ring king uses this? Be sure to nobuild the entire map, because engy's can still build stuff using the console.
 

lerlerson

L2: Junior Member
Nov 27, 2007
75
7
The thought is, do the Resupply lockers permanently restore the weapons, or only until they're out of the Resupply?
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
Killing a weapon entity removes it from everyone on a map. But a player will get his weapons back when he respawns and when he touches a func_regenerate. When he gets his weapons back he keeps them until the entity is killed again.
 

kimangroo

L3: Member
Mar 15, 2008
111
6
Sorry to be slow, but what you guys are saying is, you can either have no specific weapons for any class in a map, all the time, by setting the kill command on player spawn, but you can't mix and match, keep some players with weapons and have others without?

For a jail scenario, maybe you could limit classes in the map. Spawn everyone as snipers if they end up in jail, don't allow snipers outside the jail and then constantly strip them of sniper rifle and smg. Pretty damn hacky though. You really want snipers as guards.
 

TotalMark

L6: Sharp Member
Feb 13, 2008
331
78
Keep firing the kill commands to the whole map using a timer, and set up triggers to fire it whenever anyone walks out of the spawnroom.
 
T

The Asylum

k, I'm a little stuck here.

I've created a trigger_multiple brush, and have the following output:

My output named: OnStart
Target entities named: ____________
Via this input: Kill

Am I on the right track? What exactly do I put in the entities named field, the name of the weapon?
 
Last edited by a moderator:

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
k, I'm a little stuck here.

I've created a trigger_multiple brush, and have the following output:

My output named: OnStart
Target entities named: ____________
Via this input: Kill

Am I on the right track? What exactly do I put in the entities named field, the name of the weapon?


Yes, you type in the name of the weapon as the target. It will show up as an error in Hammer. I've made a list of the weapon names here.
 

Lamech

L1: Registered
May 21, 2009
18
8
Well I have tried a few ways, Ontrigger and Ontouching, but even though it seems to work it crashes the server. Anyone got a good working way here?
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
You gotta use sv_cheats.
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
No. Kil lalways crashes the game after the Medic update. You gotta go to a servercommand entity and use:

Command
ent_remove_all tf_weapon_######
 

Lamech

L1: Registered
May 21, 2009
18
8
No. Kil lalways crashes the game after the Medic update. You gotta go to a servercommand entity and use:

Command
ent_remove_all tf_weapon_######

Ok I appreciate it, I hate that I cannot use kill anymore I am real iffy with using sv_cheats but if done quickly I am sure it cannot be exploited. I just hope it wont mess with any stats system, then again its just a votemap :rolleyes:

EDIT : Well works fine, just odd how sv_cheats turns of the default lighting when no other lighting is found. Not much of a problem since the weapon strip will only be needed when the map is finished anyhow.
 
Last edited: