Npc's firing

Discuss Certain Aspects of Mapping, Modeling, and Coding.
Post Reply
joshvaliant
Pixel
Posts: 4
Joined: Thu May 28, 2009 11:02 pm

Npc's firing

Post by joshvaliant »

Hello this is my first post ever :D and i have 2 questions
firstly how do i make npc's fire the custom_p90 cause all they do is hold it and pretend to shoot XD
Also is there a way to change the relationship of and npc such a hgrunt to a freindly one in game
Any help would be very appreciated

(also one more thing, the custom weapons that do work on some maps npc's only fire semi automatic really slowly for some reason, any idea why???
Blues
npc_combinegunship
npc_combinegunship
Posts: 740
Joined: Wed Feb 13, 2008 8:47 pm

Post by Blues »

ai_relationship

or something about the input AddToPlayerSquad

I don't really know much about that, though..
Image Image Image

Excuse me for being rude. I'm usually drunk while posting.
User avatar
JerC
Donator
Donator
Posts: 914
Joined: Fri Jan 30, 2009 1:37 pm
Location: France

Post by JerC »

Theres ent_fire npc_"name" setrelationship "player d_li 90" too
Please don't take my posts before 2013 too seriously. It will be better for both you and I :c
joshvaliant
Pixel
Posts: 4
Joined: Thu May 28, 2009 11:02 pm

Post by joshvaliant »

alright i my hgrunts friendly :D
Now is there a command to make them automatically freindly every time i spawn one, or a way to bind it to a key cause every time i type
bind f "ent_fire npc_hgrunt setrelationship "!player d_li 90"
i get one of those errors in the console as if i hadn't chosen a key to be binded, any one who can offer help here will be in my gratitude

edit: i think the binding has to do with using the quotes before !player only problem is that the command doesnt work without it...any ideas?
joshvaliant
Pixel
Posts: 4
Joined: Thu May 28, 2009 11:02 pm

Post by joshvaliant »

Alright i solved my own problem what i had to do was make a cfg file called bindf.cfg
in the file i typed the command
then in game i typed bind f "exec bindf.cfg" and walla it works
Now all i need left is how to make npc's use custom weapons like the p90 which doesnt work for them while for some reason the m4new does
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Hi,

I have to ask,

Do you intened to run your own server? Are you playing in Single Player or are you making a map?

If you really want npc_hgrunts to have P90's you will need to write a obsidian/scripts/customweapon/custom_p90yourownname.txt making sure that the p90 uses the Ar2 animations. look at the custom_m4new script and you'll get the idea.

(This above idea is really if you are running your own server or making your own map, as you can add it to a '.res' file for others to enjoy). Though it should be fine if your messing around in Single Player.


And if you have cheats enabled (sv_cheats 1) then this may be of help.

Code: Select all

npc_create npc_hgrunt;npc_create_equipment custom_ak47new  
Just change the 'custom_ak47new' to your newly made script of the p90 with ar2 animations.

There are more cheat commands listed here:
http://www.obsidianconflict.net/forums/ ... 55&start=0
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
Post Reply