Stripping/Adding Weapons in TFC Maps Created 16 years ago2007-08-13 14:18:57 UTC by StoneFrog StoneFrog

Created 16 years ago2007-08-13 14:18:57 UTC by StoneFrog StoneFrog

Posted 16 years ago2007-08-13 14:18:57 UTC Post #232001
How do you strip a player of weapons in TFC maps, and, in turn, how to add weapons?

Examples of this are in the area49 maps, militia_beta, and shipwrecked. In all of these maps, the player either starts weaponless and then finds weapons, or at one point loses their weapons.

Don't suggest to, say, have players start with 0 ammo in their weapons and find ammo as they go along. In the maps I listed above, players actually get weapons that their class wouldn't normally have - such as a civilian finding a shotgun.
Posted 16 years ago2007-08-13 14:43:04 UTC Post #232004
Not sure bout TFC but i KNOW HL uses game_player_equips and player_weaponstrips. The names are self explanatory and just click the links to find out more.
Tetsu0 Tetsu0Positive Chaos
Posted 16 years ago2007-08-13 15:19:45 UTC Post #232009
Well player_weaponstrip is in TFC, which is would solve the stripping part.

I know how to use game_player_equip, though sadly those are not in TFC. Even if they were, I wouldn't know the names of each weapon.
Posted 16 years ago2007-08-13 15:30:12 UTC Post #232011
Here's what you can do:

If it is available in TFC, you can use a monstermaker. It can spawn weapons, ammo, items, not only monsters.

So place one at the same location as a playerspawn, name the monstermaker "game_playerspawn", so that the monstermaker is triggered as soon as a player spawns/respawns. You can only provide one item per monstermaker, so you need to place more than one monstermaker to equip a player with the weapons you want.

You may need to set some flags, but i don't remember those atm.
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-08-13 16:14:59 UTC Post #232013
or if TFC can use game_player_equip, you could add your own to the FGD! In any case, you could try adding your own game_player_equip and see if it works.
Posted 16 years ago2007-08-13 17:46:04 UTC Post #232016
But the code is probably missing for TFC. So that won't work.
The Mad Carrot The Mad CarrotMad Carrot
Posted 16 years ago2007-08-14 00:14:36 UTC Post #232035
It can spawn weapons, ammo, items, not only monsters.
That's a handy bit of knowledge i didn't know before.
Tetsu0 Tetsu0Positive Chaos
Posted 16 years ago2007-08-14 00:46:38 UTC Post #232036
But the code is probably missing for TFC. So that won't work.
That's why I said that he should try it. Per chance it fails to work, well then it doesn't work. If it does, then happy day. =)
Posted 16 years ago2007-08-14 20:23:00 UTC Post #232102
Hmm. Other maps that add weapons, instead of choosing an entity from a dropdown list, they type in an entity name and it works, such as tf_tranq or something for the spy's tranquilizer gun.

I guess I'll try that...
You must be logged in to post a response.