Dateien

> > CS2D > Lua Scripts > Starkkz's NPC Pack
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Starkkz's NPC Pack >

66 Kommentare3,64 mb, 1.163 Downloads

alt Starkkz's NPC Pack

Starkkz
Moderator Off Offline

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 hat geschrieben
SpawnNPC('name of the NPC', x, y, rotation)

In console hat geschrieben
lua "SpawnNPC('name of the NPC', x, y, rotation)"

NPC names hat geschrieben
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:https://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png
11× editiert, zuletzt 29.08.15 00:06:05
Zugelassen von Infinite Rain

Download Download

3,64 mb, 1.163 Downloads

Kommentare

66 Kommentare
Seite
Zum Anfang Vorherige 1 2 3 4 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

AlcatrazZ
BANNED Off Offline

Cool! I will use the script for my comming script.
Thanks.
Ich mag es!

alt

Dousea
User Off Offline

user Avo hat geschrieben
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.

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
Ich mag es!

alt

Vennece
User Off Offline

thanks user Starkkz and i gonna make npc for me
Ich mag es!

alt

Starkkz
Moderator Off Offline

@user Dousea: 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.

alt

Dousea
User Off Offline

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.
Ich mag es!

alt

Starkkz
Moderator Off Offline

@user Vennece: Just place a trigger_if on the map and put the first example.

alt

Vennece
User Off Offline

can i add in map editor? these npc please..
Ich mag es!

alt

Hellcat
GAME BANNED Off Offline

Awesome Starkkz! Good Job
Ich mag es!

alt

Avo
User Off Offline

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.
Ich mag es!

alt

Pseudon
User Off Offline

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.
Ich mag es!

alt

BATTLEKOT
User Off Offline

Stridrer!
Please create Hunter from HL2 ep2
Ich mag es!

alt

-DIE Wolf-
User Off Offline

I get glitch. When i spawn about 3 HeadCrab at same position. Try it, and u will see
Also, nice LUA.
Ich mag es!

alt

SovietComrade
User Off Offline

Can you make somethings about solder?
Like solder with sniper
____________ RPG
____________ shield
____________ shotgun

Can you?
Ich mag es!

alt O_o"

Lobwver
User Off Offline

OMG epic one
youre a genius
Ich mag es!

alt

Zero6
User Off Offline

Hahaha Starkkz, i remember in that 30 striders army they was too many and i murder them all! like a boss
Ich mag es!

alt

tonton2d
User Off Offline

awesome!
Ich mag es!

alt

theunrealone
User Off Offline

Lol, it is cool! But please make it that you can set it by using trigger function.
Ich mag es!

alt

Gajos
BANNED Off Offline

Add explosion while Strider die.
Ich mag es!

alt

Reaxter
User Off Offline

Impressive.
Ich mag es!
Zum Anfang Vorherige 1 2 3 4 Nächste Zum Anfang