Disarming enemy

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
User avatar
Andrax17
npc_combine_elite
npc_combine_elite
Posts: 451
Joined: Wed May 05, 2010 7:11 pm
Location: Finland
Contact:

Disarming enemy

Post by Andrax17 »

So yea, for my new map, i want players to be able to disarm few metropolice at the beginning.
I planned it so that when player gets near them and press use key, the metropolice would lose hes weapon and the player who pressed it, would get the weapon.

But im not really sure on how to make the metropolice lose hes weapon without making him holster it, nor do i know how to give specific weapon to a player (when the player triggers it)
I dont really know if this is possible...i guess it is.

So if anyone knows how to do this, i would be glad to know.
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Re: Disarming enemy

Post by Shana »

Weapons of npcs have targetnames too, "<npc's targetname>_weapon".

So you could "kill" the weapon and use game_player_equip to give a weapon to the player.
Axel_m3sh
npc_combine_elite
npc_combine_elite
Posts: 469
Joined: Wed Nov 05, 2008 5:52 am
Location: lolwut L0C4tI0n?
Contact:

Re: Disarming enemy

Post by Axel_m3sh »

Wait if npc weapons have targetnames, is it possible to then attach something to the weapon? (ie: env_sparks to the muzzle attachment or w/e)
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Re: Disarming enemy

Post by Gary »

I would assume so... wait... FLASHLIGHTS!!!

Edit:

Image
Post Reply