Raised This Month: $12 Target: $400
 3% 

[HOWTO] Make a NPC with extra features.


Post New Thread Reply   
 
Thread Tools Display Modes
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 12-29-2010 , 05:24   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #21

How to make a npc can search and kill player ?.
I already like this
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 01-04-2011 , 21:34   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #22

Haha, you see in HL.. No npc find you to kill unless they see you in a first time.. They'll be agressive.
__________________
albert123 is offline
Kidev
Veteran Member
Join Date: Jun 2010
Location: France
Old 01-29-2011 , 12:46   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #23

You helped me, thanks!
+karma
__________________
Kidev is offline
Old 01-31-2011, 03:11
XpaHuTeJIb
This message has been deleted by Exolent[jNr]. Reason: Cross-post.
qlail
Member
Join Date: Aug 2009
Old 01-19-2012 , 14:09   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #24

When able could you show us how to set it up as a basic shop npc?
qlail is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 01-19-2012 , 14:22   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #25

public npc_TakeDamage(ent, inflictor, attacker, Float:damage, bits)
{
//Make sure our ent classname is the same as our NPC
new className[32];
entity_get_string(iEnt, EV_SZ_classname, className, charsmax(className))
__________________
You can do anything you set your mind to, man.

Devil259 is offline
qlail
Member
Join Date: Aug 2009
Old 01-21-2012 , 15:45   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #26

Quote:
Originally Posted by Devil259 View Post
public npc_TakeDamage(ent, inflictor, attacker, Float:damage, bits)
{
//Make sure our ent classname is the same as our NPC
new className[32];
entity_get_string(iEnt, EV_SZ_classname, className, charsmax(className))
What is this for?
qlail is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 01-21-2012 , 17:01   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #27

I just said that there is a little error.

public npc_TakeDamage(ent, inflictor, attacker, Float:damage, bits)

should be

public npc_TakeDamage(iEnt, inflictor, attacker, Float:damage, bits)
__________________
You can do anything you set your mind to, man.

Devil259 is offline
qlail
Member
Join Date: Aug 2009
Old 01-21-2012 , 17:03   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #28

Oh, I haven't been able to find anything on adding a shop to be projected from an NPC, would you happen to know anything? I'd figure just to connect a menu, with items in it along with prices, up to the NPC, but not completely sure how to do so.
qlail is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 01-21-2012 , 18:56   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #29

Look when player press +use and if he aims the npc ( Check the distance maybe ).
__________________
micapat is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 02-13-2012 , 03:30   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #30

Updated tutorial.

Fixed some types and bugs.

Added loading and saving from a config file based on maps.
Added menu to create, delete and save NPCs.
Added function to use the NPC when close enough


Any questions just ask away.
__________________
It's a mystery.
Mini_Midget is offline
Reply


Thread Tools
Display Modes

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 17:44.


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