Obsidian Conflict Forums

Have you seen my coffee cup?
It is currently Tue Oct 17, 2017 5:01 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Disarming enemy
PostPosted: Sat Feb 12, 2011 12:17 am 
Offline
Beta Tester
Beta Tester
User avatar

Joined: Wed May 05, 2010 7:11 pm
Posts: 475
Location: Finland
Has thanked: 68 times
Have thanks: 53 times
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.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Disarming enemy
PostPosted: Sat Feb 12, 2011 12:22 am 
Offline
Lead Developer
Lead Developer
User avatar

Joined: Tue Aug 29, 2006 8:12 pm
Posts: 3042
Location: Germany
Has thanked: 240 times
Have thanks: 184 times
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.

_________________
Image



For this message the author Shana has received thanks: Andrax17(Sat Feb 12, 2011 2:51 am)
Top
 Profile  
 
 Post subject: Re: Disarming enemy
PostPosted: Sat Feb 12, 2011 5:28 am 
Offline
npc_combine_elite
npc_combine_elite

Joined: Wed Nov 05, 2008 6:52 am
Posts: 469
Location: lolwut L0C4tI0n?
Has thanked: 17 times
Have thanks: 28 times
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)


Top
 Profile  
 
 Post subject: Re: Disarming enemy
PostPosted: Sat Feb 12, 2011 5:34 am 
Offline
npc_advisor
npc_advisor
User avatar

Joined: Sun Nov 09, 2008 8:21 am
Posts: 1160
Location: USA, FL
Has thanked: 26 times
Have thanks: 49 times
I would assume so... wait... FLASHLIGHTS!!!

Edit:

Image

_________________
Have a question related to modding? PM me or message me on Steam(link below)

- [|YouTube|] - [|99 Bolts|] - [|Steam|] - [|Mod DB|] -


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group