HAMMER help: removing weapons and more

Tranthor

2009-05-25 04:01:49

Hi,
I've been working on my first map (sorry, it's a killbox :| ). I ran my Alpha version and it works great, but i need some questions answered before i release a beta.

I'm making a melee only killbox, and I need to know how to remove weapons from players or prevent people from spawning with certain weapons.

I also would like to know:
-Once you have used the clip tool on a brush, is it possible to (later) combine the two blocks into one?
-where might one find those big ugly octagons from dm_killbox_final?

Thanks,
Tranthor

Beef

2009-05-25 07:36:55

Strip / Equip is buggy. But I'm speaking from my experience with it. Perhaps some of the other mappers have had better luck with it. Sometimes it can cause you to crash, or people will randomly spawn with nothing, or spawn with default weapons.
But you can try it.
This is how I've done it: (click me ) use a trigger_multiple that encompasses the map (so every spawn / player is touching it, always). Then you need a player_weaponstrip. and a game_player_equip. For the equip, you might have to turn off "smart edit" to enter the values.
So if it's a melee map, you'll add weapon_crowbar and weapon_stunstick, each with a value of 1. If you want gravgun, you'll want to add it at this point, too.

The big ugly octagons are cylinder brushes tied to (ctrl + T) func_physbox.

Tranthor

2009-05-25 07:47:39

Thank you very much beef, I'll give that a try.

If I am running a quite small map (in terms of file size) on a max-8-players server, is it less likely to cause crashes?

boshed

2009-05-25 15:16:12

Played a few maps that strip your weapons, some crash constantly on me and some don't crash at all. I stay well away from stripping weapons tbh.
Tranthor wrote: -Once you have used the clip tool on a brush, is it possible to (later) combine the two blocks into one?
Nope, you have to remake the brush.

Sadist

2009-05-26 00:08:03

So if it's a melee map, you'll add weapon_crowbar and weapon_stunstick, each with a value of 1. If you want gravgun, you'll want to add it at this point, too.
I would advise having only stick or crowbar, double melee from the game_player_equip can cause crashes. Try using 2 game_player_equip, one for each melee weapon, and trigger each using the same trigger_multiple

Tranthor

2009-05-26 02:17:03

Hypothetically, could one remove the weapons server-side, instead of in the map?
Say, for example, I make 2 config files. One of them is called, oh how about Fixweapons.cfg, and the other is called admin.cfg

Fixweapons.cfg could contain

Code: Select all

ent_remove_all weapon_357
ent_remove_all weapon_shotgun
ent_remove_all weapon_smg1
ent_remove_all weapon_ar2
ent_remove_all weapon_rpg
ent_remove_all weapon_crossbow
ent_remove_all weapon_frag
ent_remove_all item_ammo_pistol
ent_remove_all item_ammo_357
ent_remove_all item_box_buckshot
ent_remove_all item_ammo_smg1
ent_remove_all item_ammo_smg1_grenade
ent_remove_all item_ammo_ar2
ent_remove_all item_ammo_ar2_large
ent_remove_all item_ammo_ar2_altfire
ent_remove_all item_rpg_round
ent_remove_all item_ammo_crossbow
[/size]

and admin.cfg would contain, along with any binds I need,

Code: Select all

alias "fix" "sv_cheats 1;wait;exec fixweapons.cfg;wait;sv_cheats 0"
fix

Would this work, or would I have to make a bind for the alias "fix" and use it everytime someone spawned?


Keep in mind, the only point of this map is for me, I don't care about other servers running it (good attitude to have, huh?) so if players get to keep their smg and nades without my config files, it wouldn't make a difference to me. However, I suspect that ent_remove_all wouldn't apply to newly spawned players, am I right?

-Tranthor, the Gigantic Space Hippo

boshed

2009-05-26 03:49:14

Sadist wrote: I would advise having only stick or crowbar, double melee from the game_player_equip can cause crashes. Try using 2 game_player_equip, one for each melee weapon, and trigger each using the same trigger_multiple
Sticking zone is one of the maps that's never crashed on me. :wink:

Tranthor

2009-05-27 03:02:55

I have just noticed, in Beef's link to game_player_equip
I've modified the HL2 and CSS FGDs to allow you to choose whether to give each weapon
and sure enough, it does have smartedit for that! If this works properly, it ought to be much easier

Tranthor

2009-05-28 02:09:29

update: looks good so far, but I have another question

Is it possible to re-size physics props?

Beef

2009-05-28 06:03:14

I would advise having only stick or crowbar, double melee from the game_player_equip can cause crashes. Try using 2 game_player_equip, one for each melee weapon, and trigger each using the same trigger_multiple
Cool, I'll have to try that sometime!

Tranthor, I found this link: http://www.interlopers.net/forum/viewto ... 14&t=17760

I'm sure there are other resources out there too. I haven't explored modeling so I'm not much help.

Tranthor

2009-05-28 07:00:18

does it require a trigger_multiple to make the game_player_equip work?

Tranthor

2009-06-04 05:16:10

Ok, so, I still don't entirely get this. when you say that the trigger_multiple needs to touch every spawn, do you mean like make a giant box around the outside of the map or something? and how do I make sure that my trigger_multiple is triggering the player_weaponstrip and game_player_equip?