English Starkkz's NPC Pack icon

66 comments
30.09.13 10:26:15 pm
like 46 like it!
3.64 mb, 610 Downloads
Starkkz
Moderator
Offline Off
Hello, this is a pre-release of my NPC Pack for CS2D, I'm just uploading this as the thread seems that it's going to die and I don't know if someone will take this but I'm leaving it for you to use it.

> AI Features
• A* Pathfinding
• Angle calculation
• Distance calculation
• Target finding

> NPCs
• Strider
• HoundEye
• HeadCrab
• Alien Grunt
• Bullsquid



How to spawn a NPC?
You have to use the lua command SpawnNPC
In Lua has written:
SpawnNPC('name of the NPC', x, y, rotation)

In console has written:
lua "SpawnNPC('name of the NPC', x, y, rotation)"

NPC names has written:
Strider
HoundEye
Headcrab
Agrunt


Probably I will keep adding NPCs to this pack, you can suggest more ideas at the thread thread cs2d NPC Pack: Ideas.

Credits to user useigor for some sprites.

IMG:http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png
edited 11×, last 29.08.15 12:06:05 am
ok This file has been reviewed and approved by Communism (04.12.15 01:24:18 am)

Comments

66 comments
Goto Page
To the start Previous 1 2 3 4 Next To the start

Log in!

You need to log in to be able to write comments!Log in
05.05.14 10:57:17 am
like I like it!
Up
AlcatrazZ
BANNED
Offline Off
Cool! I will use the script for my comming script.
Thanks.
17.04.14 10:59:08 am
like I like it!
Up
Ortimh
User
Offline Off
user Avo has written:
Adding these custom NPCs would be nice to implement with entities in map editor. What I mean is to create NPC entity and if its name is something like "NPC:Strider", game will automatically spawn Strider on the map where that entity is put.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
for key, self in pairs (entitylist ()) do
     if (entity (self.x, self.y, "typename") == "Env_NPC") then
          local name = entity (self.x, self.y, "name")
          
          if (name:sub (1, 4) == "NPC:") then
               local noerror, message = SpawnNPC (name:sub (5, #name), ((self.x * 32) + 16), ((self.y * 32) + 16), entity (self.x, self.y, "int0"))
               
               if (not noerror) then
                    print ("NPC Error: " .. message)
               end
          end
     end
end
03.04.14 04:15:55 am
like I like it!
Up
thanks user Starkkz and i gonna make npc for me
02.04.14 02:58:50 pm
Up
Starkkz
Moderator
Offline Off
@user Ortimh: It is, at least my script has a functionality that allows you to choose which tiles are going to be walkable, it also affects the pathfinding algorithm.
02.04.14 02:38:56 pm
like I like it!
Up
Ortimh
User
Offline Off
Impressive. I hope I can make my own NPC but because of the difficulty of your script makes it impossible. Well is it possible to make NPCs walk around walkable tiles? I hope it is.
02.04.14 02:22:59 pm
Up
Starkkz
Moderator
Offline Off
@user hope you remember 4D: Just place a trigger_if on the map and put the first example.
02.04.14 04:32:53 am
like I like it!
Up
can i add in map editor? these npc please..
01.04.14 09:20:10 pm
like I like it!
Up
Hellcat
GAME BANNED
Offline Off
Awesome Starkkz! Good Job
28.01.14 08:23:59 pm
like I like it!
Up
Avo
User
Offline Off
Adding these custom NPCs would be nice to implement with entities in map editor. What I mean is to create NPC entity and if its name is something like "NPC:Strider", game will automatically spawn Strider on the map where that entity is put.
28.01.14 07:21:02 pm
like I like it!
Up
Pseudon
User
Offline Off
Masterpiece. This could be the start of so many maps,i mean with this script and if "we" the players could make our own NPCs then many users could make custom maps for singleplayer and co-op,and i think that it would be awesome.
28.01.14 01:58:40 pm
like I like it!
Up
BATTLEKOT
User
Offline Off
Stridrer!
Please create Hunter from HL2 ep2
28.01.14 03:45:22 am
like I like it!
Up
-DIE Wolf-
User
Offline Off
I get glitch. When i spawn about 3 HeadCrab at same position. Try it, and u will see
Also, nice LUA.
27.01.14 03:05:30 pm
like I like it!
Up
SovietComrade
User
Offline Off
Can you make somethings about solder?
Like solder with sniper
____________ RPG
____________ shield
____________ shotgun

Can you?
27.12.13 04:43:38 am
like I like it!
Up
FDK
User
Offline Off
OMG epic one
youre a genius
04.12.13 05:37:53 pm
like I like it!
Up
Zero6
User
Offline Off
Hahaha Starkkz, i remember in that 30 striders army they was too many and i murder them all! like a boss
03.12.13 11:15:22 pm
like I like it!
Up
tonton2d
User
Offline Off
awesome!
05.10.13 06:15:04 am
like I like it!
Up
theunrealone
User
Offline Off
Lol, it is cool! But please make it that you can set it by using trigger function.
03.10.13 02:57:12 pm
like I like it!
Up
Gajos
BANNED
Offline Off
Add explosion while Strider die.
03.10.13 12:48:26 am
like I like it!
Up
Reaxter
User
Offline Off
Impressive.
02.10.13 08:33:26 pm
Up
Starkkz
Moderator
Offline Off
@user Communism: Sure.
To the start Previous 1 2 3 4 Next To the start