Raised This Month: $32 Target: $400
 8% 

NPC in CS:S


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Functor
Junior Member
Join Date: May 2006
Old 08-09-2006 , 13:33   NPC in CS:S
Reply With Quote #1

Hello,

Is there someone created a server-mod which creates NPC (non-CT, non-T, non-Hostage monster) ? Is it possible ? I would like to have zombies which spawn near campers and attack them.
Functor is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 08-10-2006 , 03:52   Re: NPC in CS:S
Reply With Quote #2

It's not just a matter of creating/spawning them. That would be easy.

The code which controls them was removed from the CS:S binaries so alot of work would be needed.

It's not impossible, but time consuming!
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Functor
Junior Member
Join Date: May 2006
Old 08-10-2006 , 04:54   Re: NPC in CS:S
Reply With Quote #3

Yeah, I know the latter part is more difficult, but currently I have troubles with the former...
I cannot find an appropriate classname for CreateEntityByName...
Functor is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 08-11-2006 , 04:04   Re: NPC in CS:S
Reply With Quote #4

Because they are one in the same, the classes were removed from the binaries so you would need to recreate the class yourself while trying to match up the virtual functions with CBaseEntity even though we don't know what they are :\
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Functor
Junior Member
Join Date: May 2006
Old 10-05-2006 , 10:33   Re: NPC in CS:S
Reply With Quote #5

Finally I could have written a code to spawn NPC headcrabs in CS:S.
They are quite stupid as I use the default NPC thinking algorithm defined
in CAI_BaseNPC, though...
Try my server if you are interested to see my headcrabs:
http://www.game-monitor.com/GameServ...7.75.61:27015/
(You can launch them selecting the spider bomb extra weapon.)
__________________
Functor is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 10-05-2006 , 11:43   Re: NPC in CS:S
Reply With Quote #6

Got some cool stuff going on there. I hadn't seen any other plugin (besides one I was working on) where you could pick up stuff. I hook the touch function. Do you do that or do you just check locations?

The energy dissolve from HL2 was a nice touch also.
L. Duke is offline
Functor
Junior Member
Join Date: May 2006
Old 10-05-2006 , 11:51   Re: NPC in CS:S
Reply With Quote #7

Thanks for playing. As your guess, I use a touch hook for many object interactions.
Checking positions for every several ticks is easy, but awfully inefficient and not quite good way of programming. :-)
__________________
Functor is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 10-05-2006 , 12:55   Re: NPC in CS:S
Reply With Quote #8

That's what I was guessing, but it felt slightly different. I must have had had something a little different in my VPhysics stuff, cause the player would often step up onto the healthpack model before the Touch was called.

Nice work!
L. Duke is offline
Functor
Junior Member
Join Date: May 2006
Old 10-05-2006 , 14:39   Re: NPC in CS:S
Reply With Quote #9

I uses the following settings for the health-kit:
SolidFlags: USE_TRIGGER_BOUNDS; NOT_STANDABLE; TRIGGER
CollisionGroup: DEBRIS
MoveType: VPHYSICS, FLY_BOUNCE;
Solid: SOLID_BBOX
I think your code misses NOT_STANDABLE or something.
__________________
Functor is offline
Functor
Junior Member
Join Date: May 2006
Old 09-20-2007 , 08:45   Re: NPC in CS:S
Reply With Quote #10

One year past from the discussion and finally I have the following:

http://www.game-monitor.com/GameServ...7.75.61:27015/

Enjoy
(Sorry if you have a high ping, everything done in the server therefore
NPC looks with a large lag for high pingers.)
__________________
Functor is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode